HNHacker News
TopNewBestAskShowJobs

alexkus

926 karma · joined July 1, 2012

submissionscomments
alexkus··on If PHP were British
In the UK, hardly anyone who has gone through puberty uses "super" or "wicked" as a superlative.
alexkus··on If PHP were British
Having lived in the US for a few years (but now back in the UK) I get confused by many of the UK/US spelling differences. Not the -ise/-ize or colo[u]r type stuff, but things like "tyre/tire", "centre/center", "litre/liter", etc. It'll eventually sort itself out I suppose.
alexkus··on He Has Millions and a New Job at Yahoo. Soon, He’ll Be 18
Indeed, when it's time to launch my startup I'll be dragging in my 3 year old daughter as co-founder.
alexkus··on How I became a password cracker
Perfectly true, but those points are irrelevant for password hashing.
alexkus··on Oracle Is Bleeding At The Hands Of Database Rivals
Along with their own database and operating system a la IBM.

It's a good model to be spread over multiple segments: hardware/software/services. Bad quarters in one segment are usually covered by good quarters in another.

alexkus··on How I became a password cracker
Most encryption algorithms (including block ciphers) can be used as a hashing algorithm for passwords.

Just encrypt a common known plaintext string and use the password as the encryption key. This is exactly how various hashing schemes like UNIX's crypt() (based on DES) work.

Knowing the plaintext (e.g. a set of NUL bytes) is useless as long as the encryption scheme doesn't have a weakness against known-plaintext attacks [EDIT] that allow you to recover the encryption key somehow.

alexkus··on Wikipedia data dumps and stats
EC2 + S3

Minimal charge to cover the bandwidth and hosting costs. Any profit donate to Wikipedia Foundation.

Solves that same problem for lots of people.

alexkus··on Just Use Sublime Text
Agreed.

I use plain vi[m] for several reasons but mainly because I used to visit customer sites all the time and have to use their environments. If I need to edit a whole bunch of files I needed to do it with what the customer has installed, and the bare minimum to rely on is plain old vi.

My .vimrc (if it even exists) contains:-

    set background=dark
That's it, and I generate that by hand whenever the syntax highlighting begins to annoy me if it isn't set. I've never used or even looked at a vim plugin.

Of course plain old vi has its limitations but I know what they are and have pretty good ways of doing anything else I need to do.

alexkus··on Box's 65-Year-Old Android Engineer Gives Your Startup Some Unsentimental Advice
True if your $2M sits in an account earning zero interest. In reality you need quite a bit less than $2M if you want to guarantee 20 years at $100k.
alexkus··on Voyager 1 has left the solar system
From: http://www.bbc.co.uk/news/science-environment-21866532

The Voyager project scientist at Nasa's Jet Propulsion Laboratory, Ed Stone, said he wanted to see a reorientation of the magnetic fields around the probe before declaring it to be in interstellar space. This was a "critical marker", he added. "…that change of direction has not yet been observed."

alexkus··on Twitter granted patent on Twitter-like services
> The company will not use the patents in offensive litigation without the permission of the inventors.

Now look at the names on the patent in question. Do you think they'll oppose offensive litigation specific to this patent?

alexkus··on Poor Man’s Agile: Scrum in 5 Simple Steps
Trying to implement Scrum in a $VBC is even more fun, especially when senior management are so entrenched with waterfall based processes where there is much more information (almost) set in stone upfront/earlier.

"What are you going to commit to delivering in this project?"

"points This stuff is pretty much guaranteed, unless you change your minds on the priorities."

"But that's only about 40% of the dev time we've got until our planned release date[1]."

"Yes, that's all we can commit to definitely doing. They'll be more, don't worry, but what depends on what the priorities become at a later date and where we get led with customer feedback[2]."

"But I can't go to my management team with this, they won't understand why we're not committing to much!"

"They should understand, they told us to do Agile in the first place[3]"

Project starts...

"Can I get copies of the detailed design docs?"

"We don't have any detailed design docs, you can have a look at the design docs we've got but just remember that they're 'Barely Good Enough'."

"But I can't go to...[4]"

1. Ok, we can handle an upfront release date.

2. Ha, like we'll be able to get any of that.

3. With little or no actual understanding of how it works. But it's a nice buzzword to spray around with customers...

4. etc, etc, etc

alexkus··on JSLinux rewritten to be human readable, deobfuscated and annotated
Why don't you try it for a bunch of input values and find out yourself?

Hint: 0->0, 1->1, ..., 9->9, 10->16, ..., 19->25, 20->32, 29->41, 30->48, ...

alexkus··on An apology to open source
It would be helpful if you were more specific than just "Around here".
alexkus··on An apology to open source
The IP of my final year (UK) university project belongs to the University not me, and not to the company that was sponsoring me for my final year.
alexkus··on Linode NextGen: The Hardware
They're relying on the fact that not everyone maxes out their CPU usage all the time.

Context switching is less of a problem when you consider that the L1 and L2 caches of the CPU(s) are also shared amongst the 100+ VMs running on it.

If you're running something that is CPU intensive, or sensitive to something else taking over the cache, then running in a VM can be painful especially when you're not in control of what else is running on that server.

alexkus··on Real Email Validation
Will also fail to allow addresses that purposely soft bounce (4xx) the first attempt (or attempts within a certain time limit) to deliver to them.
alexkus··on What I Learned from a Sex-Crazed Short-Order Cook
Yep, I can relate to this.

10 years in catering (a pub kitchen and then a steak restaurant chain) starting as a pot washer, then commis chef all the way to grill chef including stints as acting head chef in a couple of other local restaurants in the chain.

Constant hard graft that had 99% of deadlines measured in single digit minutes not months.

It also meant I had no problems getting part time work whilst at University. I could walk straight back in to the job each term/semester, and also continue work back home during the holidays. I left University almost debt free despite getting no grant[1] and no money from parents (they couldn't afford to).

1. The UK system of subsidising University students that was in place in the 90's. This was the days before there were course fees.

alexkus··on Linode Nextgen: The Network
900% increase.
alexkus··on Unix tricks
The awk run against a file containing almost no duplicates finished after over an hour (compared to 43sec for the sort method).

    $ time awk '!x[$0]++' x.out | wc -l
    16759719

    real    64m41.089s
    user    64m31.970s
    sys     0m3.136s
Peak memory usage (given that it was a 128MB input file) was (pid, rss, vsz, comm):

     8972 1239744 1246488  \_ awk
So > 1GB for a 128MB input file.
alexkus··on Unix tricks
Yes it will, and a bit (read: a lot) more than 10GB as it needs to store the contents of variable x in a hash table (with the corresponding hash key and value of the counter). There's no other magic way it can 'know' whether a particular line has been seen before. You can't rely on hash keys alone as the hashes aren't guaranteed to be unique.

For files with relatively few duplicates it's going to be a lot slower than sort | uniq.

Trying it on a 128MB file (nowhere near enough time to test a 10GB file) filled with lines of 7 random upper case characters[1] (so hardly any duplicates):-

    $ wc -l x.out
    16777216 x.out
    
    $ time ( sort x.out | uniq ) | wc -l
    16759719

    real    0m17.982s
    user    0m42.575s
    sys     0m0.876s
    
    $ time ( sort -u x.out ) | wc -l
    16759719

    real    0m20.582s
    user    0m43.775s
    sys     0m0.688s
Not much difference between "sort | uniq" and "sort -u".

As for the awk method:-

    $ time awk '!x[$0]++' x.out | wc -l
    
has been running for more than 20 minutes and still hasn't returned. For that 128MB file the awk process is also using 650MB of memory (according to ps). Will check up on it later (have to go out now).

This Linux machine has ~16GB of memory so the file was going to be completed cached in memory before the first test. All things considered equal the awk method will be roughly O(n) (e.g. linear against file size) and sort/uniq will be O(n log n). So, theoretically, the awk method will eventually surpass the sort method because it's having to do less work (it's only checking for a previously seen key rather than sorting the entire file) but I'm not sure the crossover will be anywhere useful if the file doesn't contain many duplicates.

Repeating it for a file containing lots of duplicates (same 128MB file size but contents are only the 7 letter words consisting of A or B, so only 128 possible entries):-

    $ time awk '!x[$0]++' y.out | wc -l
    128
    
    real    0m1.207s
    user    0m1.192s
    sys     0m0.016s
    
    $ time ( sort y.out | uniq ) | wc -l
    128

    real    0m14.320s
    user    0m31.414s
    sys     0m0.428s
    
    $ time ( sort -u y.out | uniq ) | wc -l
    128
    
    real    0m12.638s
    user    0m30.366s
    sys     0m0.188s
Notice that "sort -u" doesn't do anything clever for files with lots of duplicates.

So awk is much faster for files with lots of duplicates. No great surprises. When I get a chance I'll repeat it for a 1GB file and a 10GB file (with lots of duplicates otherwise the awk version will take far too long).

1. Example contents:-

EPQKHPH DLJCROB WICVGQY MHWTPSR HMPNECN

alexkus··on How I came to love Windows again
> But, the wrap issue is annoying - you can't do a ps -auxwww , see that the line length is too long, and the resize the window and have your text rewrap. (At least on putty 0.6, the version on my vm instance)

You're right that putty doesn't do this, but I always run screen inside putty, which will rewrap text when the window resizes.

alexkus··on How I came to love Windows again
> On my personal machine, I basically only use Firefox, Sublime Text 2, and Terminal anymore.

My ideal dev environment is Windows running putty connecting to a local linux VM or a bunch of VMs running on a nearby ESXi server and then Firefox (and occasionally Chrome and IE for compatability testing) and a bunch of other general stuff (Thunderbird for email, Skype, music player, etc).

On a dual screen machine I'll have the putty window (or windows) made fully screen on one monitor and the remaining stuff on the other monitor. Inside the ssh session I run screen to give me multiple shells without lots of windows or tabs. A lot of my navigation is done via the keyboard.

The desktop machine is also for family and guest usage so the ability to switch user accounts but leave existing stuff running is a must.

This setup means I can also login from pretty much anywhere (that I can get an ssh connection from) and resume where I left off, including having tunnelled HTTP connections to my dev network via ssh.

alexkus··on How I came to love Windows again
PuTTY is free.

http://www.chiark.greenend.org.uk/~sgtatham/putty/

alexkus··on Why American Eggs Would Be Illegal In A British Supermarket, And Vice Versa
> she's never really lived it down

And dropped even further after the revelations about her affair with former PM John Major.

mind bleach

alexkus··on Real pixel coding (2011)
I remember being impressed by a friend at University who would do:-

copy CON: reboot.com

and then enter 8 or 9 bytes (some via ALT+keypad) all from memory.

(There are ways to do it in just 2 bytes I believe, this isn't about reboot.com golf anyway...)

alexkus··on HelloFlo Launches a Tampon Subscription Service
I used to work as a pot-washer in the kitchen of a restaurant and therefore I was the person who used to go to the petrol station next door to buy things for the other staff (waiters/waitresses, chefs, etc) as they weren't able to get away for enough time.

It wasn't unusual for me (16 y/o at the time) to go in and buy:-

    cans of coke
    multiple packs of cigarettes (all different brands)
    tampons/sanitary pads
    condoms
    2 gallons of milk, and  5 or 6 loaves of bread (when the restuarant ran out)
    confectionary
    toothpaste
    etc
I got some very very odd looks from other customers but the petrol station staff soon got used to my bizarre purchases.

It certainly helped me get over any fear of buying these kinds of items.

alexkus··on James while John had had had ... had had had a better effect on the teacher
It’s is not, it isn’t ain’t, and it’s it’s, not its, if you mean it is. If you don’t, it’s its. Then too, it’s hers. It isn’t her’s. It isn’t our’s either. It’s ours, and likewise yours and theirs.

—Oxford University Press, Edpress News

alexkus··on How I Fired Myself
> Not once have I seen a network failure simulated.

Reminds me of the webserver UPS setup at a previous company.

The router (for the incoming T1) and the webserver were plugged in to the UPS.

UPS connected (via serial port) to webserver. Stuff running on webserver to poll whether UPS running from mains power or batteries and send panic emails if on batteries (for more than 60 seconds) and eventually shutdown the webserver cleanly if UPS power dropped below 25%.

Thing not plugged in to UPS: DMZ Network switch (that provided the connectivity between webserver and router).

alexkus··on Bomberman massively multiplayer in HTML5
Server has been bombed it seems. All game servers dead.

No idea whether it was HN related or a separate issue.

← PreviousPage 6 of 14Next →