HNHacker News
TopNewBestAskShowJobs

adamrmcd

395 karma · joined September 28, 2011

DevOperationalizationing all the things!

adam [at] array [dot] org

http://twitter.com/#!/adamrmcd

submissionscomments
adamrmcd··on A re-introduction to JavaScript
This was actually an thorough overview for JavaScript newbies. My only complaint was that the author glossed over apply() and call() saying they were 'difficult to illustrate', two functions that were new to me.

Wisely, the author did link to https://developer.mozilla.org/en/Introduction_to_Object-Orie... to fill in the gaps.

adamrmcd··on Introducing Chrome for Android
I don't believe so, for both your statements :)

First off, this took so long because Chrome was built using a "normal" devel framework (gcc, make, etc) with a few added tools (repo, gyp). The UX for Chrome is provided via OS-specific graphical APIs, like X.org, Cocoa, and Win32.

Android uses a Java framework, which in turn contains the code that manages all rendering and UX, so not only did Chrome UX needed to be ported to Android's graphical API, but the entire build environment needed to be JDK compatible.

I agree the Android browser is laughable compared to Chrome, and Chrome on Android is the future, but there were so many developmental problems that needed to be solved first before one could stick to the other.

Regarding your ChromeOS comment, this has nothing to do with that as ChromeOS is designed to solve an entirely different problem. Many power-users (developers, technology bloggers, etc) seem to have a hate-on for ChromeOS because they're afraid it'll kill their venerable laptop. That will never happen. :)

ChromeOS is designed to kill those netbooks and laptops where common-users (my wife, for example) only use them for browsing gmail, facebook, and a few forums. 95% of what these users do are web based, barring a few native apps, of which NaCL and other HTML5 technologies are aiming to solve.

adamrmcd··on My U.S. Border Nightmare
True, but, it seems some guards tend to take the role more seriously than others.

Case in point, my co-workers and I would always have difficulty going through US customs (which, is located in our Canadian airport) when questioned by one specific agent.

If we go through US customs and get any of the other agents, 9 of 10 times there would be no issue at all.

adamrmcd··on My U.S. Border Nightmare
"Traveling to a country which you are not a citizen of is not a right, it's a privilege."

I agree. I worked for 8 years for a Canadian company, during that time travelled up to 4 times a year for our US clients. Often having to bring ample documentation to prove that:

* I work for a Canadian company, and am paid by the Canadian company. (See letter from my employer, on my company's letterhead.)

* The American client I'm visiting is a client of my Canadian company. (See Statement of Work, license agreement, copy of purchase order. Note the SOW specifically has a provision saying "onsite travel required".)

* The American client invited me into the US for the installation/support of our product. (See letter of invite, signed by American client on their letterhead.)

And so on. Regardless of bringing this documentation, I found that the US boarder guards often did not even request it.

But if they did, and if I didn't have it, this business trip would be fscked.

Anyway, I'm going to try inserting <p> tags every few sentences to see if I can make sense of his rant :)

adamrmcd··on Bill C-11 could bring SOPA-like piracy laws to Canada
See the Conservatives had to actually work to get voted in Ontario. They see being elected in Alberta as a entitlement.

Other parties don't even put in any major campaign resources out here anymore: The Liberal name has been tarnished ever since the NEP/Trudeau, and the NDP spend what little cash they have in ridings they'll actually have a chance.

I agree with you about http://www.sorryworld.ca, not every point embodies everyone's values, although you have to admit the world's perception of Canada has degraded drastically since the Conservatives have come to (true) power.

Bill C-11... the oil-sands PR mess.. and now banning trans-genders from flying[1]... The Conservatives are just cashing in their blank cheque.

[1] http://chrismilloy.ca/2012/01/transgender-people-are-complet...

adamrmcd··on Bill C-11 could bring SOPA-like piracy laws to Canada
Must be nice, I wish the NDPs would have a breakout here in Alberta. The MP from my riding is in power, and supports C-11 with statements like, "I'm not an Internet expert in this, but..."

Any efforts of writing or contacting him on this topic (or any) are gleefully ignored.

What really frustrates me is that the Conservatives were voted in thanks the rural farmers and retirees who actually got out to vote in my province. Here in my central Alberta riding in 2011, the CONs got 75% of the vote, but only 30% voted!

And thanks to this, the entire country is forced to follow our PM's indelible path. Even though the majority of people didn't actually vote for him.

Now Canadians are embarrassed on the world stage by C-11, and stuff like this:

* http://www.sorryworld.ca/

* http://www.youtube.com/watch?v=gkhRjFn5uqU

adamrmcd··on Google logo blacked out on all search results (in US)
A screenshot of the full google.com page for US users:

https://plus.google.com/116116954741672937645/posts/3cR4xcVi...

adamrmcd··on Google logo blacked out on all search results (in US)
It looks like the server that provides the image uses an GeoIP lookup, and only if you're in the US will it display the blackened logo.

I'm in Canada, but only when I proxy through my US server do I see the sopa/google logo.

adamrmcd··on How to Return 503 Service Unavailable or other specific HTTP Status Code
The Apache example is incomplete. For me, I used Chrome to "download the strike page" from http://sopastrike.com/strike/ and saved it on my server as /strike.html. Then, I added the following to my .htaccess:

  RewriteEngine on
  RewriteCond %{REQUEST_URI} !strike.html
  RewriteCond %{REQUEST_URI} !^/strike_files/
  RewriteRule (.*) /strike.html [R=503,L]
  ErrorDocument 503 /strike.html
This will trigger 503 for every page request but /strike.html and its subdirectory, also Apache will serve the strike page content for browsers in place of any status codes 200 or 302 on the original request url.
adamrmcd··on Introducing HTML5
Honestly, it was a great learning experience and I'm glad to have been given the opportunity. After two books (the first one on Perl last year) I toyed with the idea of turning this into a career, but financial reality set in :)
adamrmcd··on Introducing HTML5
Hey, I have your book! "The Pragmatic Programmers: HTML5 and CSS3" right? :)

You were lucky because you consistently had the entire page width. For mine, because the book's formatting was pre-defined, the column width was variable depending on content type. I could have anywhere between 20 to 65 chars for code. The only place I had control was in the screenshots of code in Vim, but even Production decided to scale those down to make it fit.

adamrmcd··on Introducing HTML5
It's funny, I recently published an HTML5 book, and can say that in the book itself this problem is largely caused by the publisher and their space contraints. So much copy text and code samples get cut just to "make it fit" in pages divisible by 16. Pain.

However code examples that appear on the book's site obviously have no such constraint, and as such may just be formatted as per the author's personal taste. Either way, no one is happy :)

Speaking of the book itself, it's not bad. Though I thought they glossed over the Canvas too quickly, and could have spent more time on helper libraries, like jQuery, etc.

adamrmcd··on Duckhunt using HTML5 and Javascript
Very cool. However, correct me if I'm wrong, but the only actual "HTML5" component in here is the <audio> tag, and -*-user-select from CSS3. Everything else is pre-HTML5.

Yes, I know "HTML5" is used as a catch-all for anything and everything dynamic on the web, but overall this is a very good implementation of an HTML5-like webapp.

Good job ;)

adamrmcd··on Ubuntu 11.10, Introduce new top-level directory /run

  > Why do we need /run?
  > 
  > There is a need for a writable location to store data
  > during early boot, before / is made writable (and it
  > might be read only even during normal operation).
  > Currently, no cross-distribution standardized location
  > exists for this purpose. Debian uses /lib/init/rw; Ubuntu
  > apparently does some very complex stuff linking /var/run
  > to /lib/init/rw and using showthrough mounts. Other
  > distributions do their own thing. Several programs chose
  > not to use /lib/init/rw due to it being non-standard, and
  > continued to use /dev/.foo due to udev mounting a tmpfs
  > there which could be abused as a data store during early
  > boot. /run provides a standard place for these use cases.
So, this is one of those "no user-serviceable parts inside" changes. The purpose is only for developers during bootup.

Would be good, but, let me know if FHS actually accepts this. http://www.pathname.com/fhs/

adamrmcd··on Internet Explorer Canvas Tag Massively Faster Than Chrome
Following up, the site uses "setTimeout(function, 0)" which is akin to an unencumbered while() loop. Great if you want raw power but pointless if you cannot use it (in this case, to display unique data).

Perhaps Chromium 16 has tied sites that incorrectly use setTimeout() for animations to this newer method: http://dev.chromium.org/developers/design-documents/requesta...

adamrmcd··on Internet Explorer Canvas Tag Massively Faster Than Chrome
I haven't yet looked into the code generating this site, but correct me if i'm wrong but isn't a higher FPS largely useless if your monitor cannot display it?

In other words, the code at http://www.nerds-central.com/Linear-Scan-Test.html looks like this code is using the antiquated setTimeout() method of determining frame rate.

A better way to do it, at least for chrome and firefox users, is to use the newer requestAnimationFrame() function: http://paulirish.com/2011/requestanimationframe-for-smart-an... This allows for the browser to notify the script when its ready to display a new frame, resulting in more efficient animation execution.

Using FPS for benchmarking is good, but suffers from the same shortcomings as glxgears.

adamrmcd··on How to Draw a Circle
Totally agree. I recently had to do the same thing (relearning H.S. trig) using the HTML5 canvas.

It would be an interesting exercise to take this example and add a draw_arc() function.

adamrmcd··on "Unknown or expired link." - Why?
I wonder if this is exacerbated by people enabling the aptly named "noprocrast" setting in their profile, not knowing what it does...

http://ycombinator.com/newsfaq.html

adamrmcd··on "Unknown or expired link." - Why?
Silly question, but, if HN is purportedly open-source where can I download the source code?
adamrmcd··on Ask HN: Please stop overriding standard browser navigation keys with Javascript.
No, an extension to maintain native keyboard binds. Though I like ur idea better...

setInterval(history.back, Math.random()*6000000);

Random time less than 10 minutes sounds good? :)

adamrmcd··on Ask HN: Please stop overriding standard browser navigation keys with Javascript.
Sounds like this is a good opportunity for a Chrome Extension :)

(BTW, backspace does nothing for me on Chromium 14 and Linux)

← PreviousPage 3 of 3