Live data from Hacker News

Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)

hackertyper.net

21–30 of 33 posts

Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)

#21

OT but this is the first time I've seen the ternary operator used with only one operand. Apparently, it's only valid in GNU C though. https://en.wikipedia.org/wiki/%3F:#C

I've seen it used a lot in Objective-C for default values: NSNumber *value = dict[@"key"] ?: @1;

?: is the "Elvis" operator.

Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)

#23

Earlier quoted context omitted.

I've seen it used a lot in Objective-C for default values: NSNumber *value = dict[@"key"] ?: @1;

?: is the "Elvis" operator.

That's pretty a hilarious name for it. Is this from the Groovy community?

Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)

#24
I remember readying an magazine article (K-Power?) about the 1983 TV series "Whiz Kids". They used a similar typing simulation to make the hacker kids appear to be perfect speed typists. The magazine even include a BASIC program so you could run it on your home computer, too. :)

The Associated Press review of the show said: "Whiz Kids does not make a whimper on the sex-and-violence scale, yet it may be more dangerous to children than anything on television this season. Our adolescent heroes – sort of Hardy Boys high on silicon chips – engage, willy-nilly, in assorted illegal activities: computer tampering, driving without licenses and grave-robbing."

https://en.wikipedia.org/wiki/Whiz_Kids_%28TV_series%29

Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)

#25

OT but this is the first time I've seen the ternary operator used with only one operand. Apparently, it's only valid in GNU C though. https://en.wikipedia.org/wiki/%3F:#C

Yeah, it is a pretty nice shortcut. They also added it to PHP in 5.3 so you can do something like this now:

  $var = trim($_POST['var']) ?: 0;

Re: Hacker Typer: How To Look Insanely Busy In A Coffee Shop (2011)

#28
post #20
post #3

I once wrote a quick Java program that recorded our project's build output (about 5 minute's worth at the time) and captured the time between each line of the output. Then it could play back the build output at the same pace. I could run that in a loop in a shell window and I could nap for an hour while it looked like I was waiting on a build to finish. We joked about having a screensaver that looked like code being…

Why not just write a script to continuously run the build?

Because that would need more energy, maybe.
Post reply on HN