Hacker News new | past | comments | ask | show | jobs | submit | mmj's comments login

Being able to relate with the student.

For instance after I learn a language and am trying to teach someone else the language I just can't see why the person is having trouble learning a certain concept of the language. It all seems so simple to me since I've already learned this language and it's hard for me to be able to empathize with the learner.


This is the key in my opinion. Just to elaborate a bit: you can think of knowledge as a mental structure. The good/great teachers are able to empathize with the students position of not having any of that knowledge, and can effectively build up the entire structure to make what they learned meaningful. The poor teachers just teach the final layer and wonder why people aren't getting it.


Couldn't agree more. Great teachers, at least in my opinion, easily recognize all the common pitfalls where people get stuck and help them accordingly.


  PS This system measured my connection speed as 20Mbps. Which is about 5x too large.
  
  
  GET /inet/ent_logon/Logon?redirectjsp=true HTTP/1.1
  
  HTTP/1.x 200 OK
  Content-Encoding: gzip
---

The page is gziped.


Perhaps a gif was used on the assumption that gzip wouldn't be able to further compress it.


no. since it is gzipped, there is no progressive download of the page and it is all downloaded at once and then executed. so startTime and endTime are measuring processor execution rather than download speed.

it is a flawed method. a better method would be to make an xmlhttprequest to an object of known size and compare the time to known times for known connection speeds. this method also has the advantage that you don't interrupt the page being loaded and don't interrupt the user experience since it is run in parallel.


since it is gzipped, there is no progressive download of the page

Gzipped data can be incrementally decompressed. Are you sure browsers download the entire page before starting decompression?

(Not that this would make the test much better; I agree it has numerous flaws. Just curious about what browsers actually do.)


I remove the search bar in Firefox and just use the address bar for searches. It searches Google and if the result is popular enough it goes directly to that page.


Does load faster the Firefox? O rly?

Firefox 3.1b2 opens in a fraction of the time IE8rc1 opens, on first start and on re-open.



Yeah, PHP isn't an excellent language but it does do one thing and do it well. Just 99% of examples or scripts you find are absolutley horrible. Seriously, I've seen blog posts on PHP from IBM which contain bad programming practices.


Let's keep rehashing how a language creates terrible code and how none of it has anything to do with the guy sitting in the chair pushing buttons.

Seriously, can we just nuke this argument?


I'm not sure that this "please think of the children" argument -- the one which asserts that the sight of PHP will forever warp the minds of children and risk turning them into script kiddies, or Blub programmers, or crack addicts -- can be nuked. It's really old. People were apparently using it when I was thirteen -- except that the guilty party back then was not PHP, which was more than a decade in the future, but BASIC. And I obviously didn't know about the controversy at the time, because I was too busy using hunt-and-peck typing to rekey my BASIC apps over and over again. (At the time my school's brand-new Commodore 64s didn't have tape drives, let alone floppies.)

And the kids were alright back then, and they are alright now. Applesoft BASIC makes PHP 5 look like Haskell (we're talking about a language with nothing but global scope, here), but the generation that built the Web grew up using it and it didn't hurt anyone. The smart kids just moved on to better things as they became aware of them.

Teach the kid something fun. For a thirteen year old, that's very likely to be Javascript, Actionscript (i.e. Flash), or PHP, though I certainly might give Shoes or Hackety Hack a try, or maybe this Scratch thing: http://scratch.mit.edu. Try several of these and see if any of them stick. But don't get hung up on the details. The guy is thirteen. There will be plenty of time for him to learn how ugly, fragile, insecure, opaque, and unmaintainable his code is. Try to let him have some fun and get hooked before he's forced to learn the truth. He won't sit still for it, otherwise.


As an occasional reader of The Daily WTF, I don't think it's fair to say that this sort of thing never hurt anyone.

Every language that has been around for a while has its own culture and traditions. The culture of PHP is a better reason to avoid it than the language itself. I spent a lot of time un-learning habits I picked up from languages like PHP and BASIC. I suspect I would know a lot more now if I had started with Smalltalk[0] and not had to waste as much time un-learning bad habits.

[0] Python wasn't around then


I see it every now and again.


That is a pretty niche feature, I personally wouldn't do something like that.

Check out getResponseHeader() if you are so inclined.

As for the errors, there are many ways to check for "ajax" errors, for one thing you can check the status or statusText property.


Niche? I guess you don't use json. jquery already autodetects xml, why not json too? It's not even hard - it's right in the content type.

I know how to detect errors, that was hardly my point. I was suggesting an improvement, not tech support.


You don't have to eval xml.


You don't have to eval JSON.

http://www.json.org/js.html


http://www.json.org/json2.js

// In the third stage we use the eval function to compile the text into a

// JavaScript structure. The '{' operator is subject to a syntactic ambiguity

// in JavaScript: it can begin a block or an object literal. We wrap the text

// in parens to eliminate the ambiguity.


http://www.json.org/json_parse.js

// This is a function that can parse a JSON text, producing a JavaScript

// data structure. It is a simple, recursive descent parser. It does not use

// eval or regular expressions, so it can be used as a model for implementing

// a JSON parser in other languages.


Yes, but even better would be to use jQuery's excellent JSONP method.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: