HNHacker News
TopNewBestAskShowJobs

asymptotic

409 karma · joined March 21, 2011

https://asim.ihsan.io/ https://github.com/asimihsan

[ my public key: https://keybase.io/asim; my proof: https://keybase.io/asim/sigs/ghOttQMhTUWDaeBj1z7Ebq-7KDe5wAATYO8RQ1QGUBs ]

submissionscomments
asymptotic··on Poll: What is your primary development system? Mac, PC, Linux, Other
In case anyone else stumbled upon this thread, I've always thought running a VirtualBox VM in Bridged Networking mode still did not allow the VM instance to be externally accessible.

However, then I read this ServerFault thread and realised the bridge is a _new interface_, and hence you must either bind directly to it or bind to all interfaces in order to get your VM to become externally accesible!

http://serverfault.com/questions/206498/virtualbox-bridge-ne...

Fantastic!

asymptotic··on Encrypt a file so that only a SSL site's private key can decrypt
Sorry, there seems to have been a misunderstanding; I completely agree with you. I thought you were asking "Why bother using sessions keys, rather than encrypt the whole message using RSA?". My bad.
asymptotic··on Encrypt a file so that only a SSL site's private key can decrypt
It goes without saying that you shouldn't do a simple "rm" on the password file. I'm not going to put on my tin-foil hat and start gibbering about magnetic alignment and electron tunnel microscopy but this is just "one of those things" that everyone knows to avoid.
asymptotic··on Encrypt a file so that only a SSL site's private key can decrypt
Agreed. /dev/urandom should be mixed with other sources of entropy (system statistics, epoch, low-level counters, cryptographic PRNGs like Yarrow) and then "combined" using a cryptographic hash. Such a principle is used in e.g. Fortuna.

See:

https://secure.wikimedia.org/wikipedia/en/wiki/Fortuna_%28PR...

asymptotic··on Encrypt a file so that only a SSL site's private key can decrypt
Speed, because cryptanalysis via cipher-text only attacks becomes easier as you get more and more ciphertext associated with a given key, and because if someone attempts to analyse a memory core dump or the memory space of your computer hopefully the only data available is the session key, rather than the full decrypted RSA private key.

See:

https://secure.wikimedia.org/wikipedia/en/wiki/Session_key

https://secure.wikimedia.org/wikipedia/en/wiki/Ciphertext-on...

http://academic.csuohio.edu/zhao_w/teaching/Old/EEC693-S07/l...

asymptotic··on Poll: What is your primary development system? Mac, PC, Linux, Other
Yes. It turns out 12GB of RAM does come in handy. (I have the same setup, Win7 w/ Ubuntu VM).

What's more annoying is doing port mapping through VirtualBox's XML configuration files, but this is a one-off task and not too complex. I'm seriously considering purchasing Mac OS X Server edition and using that in a VM as well but I can't figure out if this actually works. Does anyone know?

asymptotic··on Ask HN: What is a good, simple project for teaching yourself Python?
Everyone here's already given solid advice to you, so I'm here to offer my two cents from a slightly different perspective.

In "Outliers", Malcolm Gladwell points out research that indicates there are three requirements for a job to be satisfying: "autonomy", or you getting to decide what you will do or how you will do, "complexity", that the job is full of tasks that engage you emotionally and intellectually at a "Goldilocks" difficulty level (not too hard, not too easy), and "connection between effort and reward", i.e. the harder you work the more you get rewarded.

In my experience, while learning new programming languages, frameworks, and software engineering concepts, since my learning happens in my free time I have bucket loads of autonomy but I often misguage the complexity level and sometimes fail to offer myself any opportunity for reward in the long run.

Hence, here are two more pieces of advice. Firstly, work on a real project, ideally for a person in real life. Someone who breathes, feels, and is willing to drink coffee with you. Ask _them_ what they want, tell them you're trying to pick up a new skill and want to help them out! What better connection between effort and reward can there be than helping a real person? (I hear people saying "money, money, money!", and yes I hear you).

Secondly, start at rock bottom and learn everything from scratch. Assume you know nothing. Be the proverbial empty cup; a student approaches a Zen master with a cup and says "Master, teach me everything you know!" and the master proceeds to fill the student's cup with tea until it starts to overflow hot water onto the students hands. The student looks confused until the master responds "How can I fill your cup when it is already full?". Then, once you get started, offer yourself increasingly more difficult challenges and concepts. Continually progress your knowledge. Even in a language as sublime and as easy to initially use as Python there are always more concepts to learn, more elegant approaches, faster methods.

Good luck!

asymptotic··on Ask HN: Do you automate most of your routine tasks?
I try to automate tasks in a hierarchical, re-usable fashion, based on log file output, and always in a pragmatic, least-cost approach. No-one is paying me to make my life easier.

For example, I'll find myself performing tasks X, Y, and Z quite a lot. I'll find out that I have 20 minutes free and I'll figure out the most common denominator of the tasks, let's call it A, and then implement it. I'll quickly re-write the high level processes X, Y, Z and to use A and then move on with my life. The up-shot is that future tasks B, C, D, E, F can all use the now-battle-hardened procedure A, and maybe others in my company will find A useful.

asymptotic··on A Collection of Examples of 64-bit Errors in Real Programs
I found myself chuckling at all the odd little pictures used to denote invalid memory areas or edge conditions (16-bit Windows is a semi-truck stuck in mud, integer truncation is the top of a truck getting shorn off by an overpass). Haha!

This is definitely one of the more colourful technical documents I've read.

asymptotic··on I'm a linux noob, that thought he knew something, got destroyed in an interview.
"In my walks, every man I meet is my superior in some way, and in that I learn from him." --Ralph Waldo Emerson

Humility my man, humility. Everyone's eaten humble pie before; if you don't eat it on a semi-regular basis you're not pushing yourself hard enough.

asymptotic··on Magical Thinking
Interesting that you mention this. I'm almost done re-reading "The Logic of Failure" by Dietrich Dörner and have come across this gem (p170) (s/war/software engineering/, s/commander/developer/):

"The effects of "methodism" - the unthinking application of a sequence of actions we have once learned - can have a significant impact in areas other than measuring quantities of water. The motivation is the same, however: we are most inclined to deconditionalize a form of action and use it over and over again if it has proved successful for us or for others. [Karl von] Clausewitz, from whom I have borrowed the term methodism, observed:

"So long as no acceptable theory, no intelligent anaylsis of the conduct of war exists, routine methods will tend to take over even at the highlest levels...Their only insights are those that they have gained by experience. For this reason, they prefer to use the means with which their experience has equipped them, even in cases that could and shuold be handled freely and individually. They will copy their supreme comanders' favorite device - thus automatically creating a new routine...War, in its highest forms, is not an infinite mass of minor events, analogous despite their diversities, which can be controlled with greater to lesser effectiveness depending on the methods applied. War consists rather of single, great, decisive actions, each of which needs to be handled individually. War is not like a field of wheat, which, without regard to the individual stalk, may be mown more of less efficiently depending on the quality of the scythe; it is like a stand of mature trees in which the ax has to be used judiciously according to the characteristics and development of each individual trunk."

...The methodist is not able to cope with specific, individual configurations on their own terms, for he has two or three ways of proceeding, and he uses one or the other depending on the general features of the situation as a whole. He does not take into account the individuality of the situation as it is evidenced in the specific configuration of its features."

asymptotic··on [dead]
Sorry, NoScript stays on by default.

Your move.

asymptotic··on Boost Interval Container Library
The Boost Interval Container Library (ICL) is relatively new; it's new from 1.46.0, which came out on 21st February 2011, hence it's quite likely few people have heard of this before.

Also, the underlying implementation (http://www.boost.org/doc/libs/1_46_1/libs/icl/doc/html/boost...) relies on STL sets and maps, rather than using something more exotic like R-Trees or kd-trees, so this might spark some discussion about alternate implementations and their respective complexities.

I say might because intervals...well, don't really do it for me. Anyone have interesting applications?

asymptotic··on PeteSearch: Launching the Data Science Toolkit
This strikes me as a novel approach of getting around the difficulty of setting up large numbers of little scripts and dependencies on a server.

However, for those of you who don't want to both renting out an EC2 instance or launching a VMWare image, the GitHub account for the code is here:

https://github.com/petewarden/dstk

In particular, there are instructions for setting up an Ubuntu server from scratch here:

https://github.com/petewarden/dstk/blob/master/docs/serverse...

Very thorough line-by-line instructions. Just skimming it it looks like it boils down to: apache, Apache Portable Runtimes, etc., PostgreSQL, Ruby, and then all the scripts.

asymptotic··on BA jihadist relied on Jesus-era encryption
I think there's a much more important angle to this story than "lol the guy doesn't know crypto basics". The angle you're looking for is "White, Jewish kaffirs can't make anything as pure and effective as our Muslim bretheren".

I did a quick search on "islam cryptography" and came up with this:

Cryptography in Islamic Civilization http://en.islamstory.com/cryptography-islamic-civilization.h...

There's a series of howlers in this allegedly academic text:

"For transposition to be effective and secure, letters rather than words need to be rearranged, this effectively scrambles the message and produces an "Anagram". Transposition could be done for example by writing the order of letters in a word backwards, so that word becomes drow. It is more effective to rearrange the letters in whole sentences or the whole message rather than single words.

If transposition was not limited to words or a certain order the number of different possibilities for rearranging a thirty five letter message rises to 50,000,000,000,000,000,000,000,000,000,000 different distinct rearrangements making the task of working out the correct rearrangement impossible even if all the people on earth were to check a single rearrangement every minute."

...notice the careful attention paid to frequency distribution analysis, which the author later claims is another output of Islamic civilisation. Additionally, if you preserve word boundaries cryptanalysis can include word length, which makes breaking the cipher all the more easier.

"Substitution is the other method by the meaning of a message may be concealed...Working with the plain English alphabet, allowing the algorithm to be any arrangement of the different letter, it is possible to generate more 400,000,000,000,000,000,000,000,000 different distinct rearrangements of letters and so the same number of different ciphers, thus producing a high level of security, baring in mind that the recipient need only to keep the key safe."

Besides mis-spelling bearing, how, exactly, were you planning on distributing the key again? Is the distribution channel more secure than your allegedly secure cipher? What happens when you re-use the key? For the love of God...you'd have thought they didn't bother reading "Cryptanalysis" by Helen Gaines, if they even wanted to pretend to make an effective cipher.

No evidence for this, but I bet you the BA plotter was drinking the koolaid a bit too much and thought too highly of the 1400s.

asymptotic··on Ask HN: Open sourcing our product?
If you open-source under the GNU General Public License (GPL) then competitors would be prohibited from re-using your code without applying the same license to their codebase.

Would looking at your code be sufficient to put you at a disadvantage or would preventing competitors from re-using your code be a sufficient defence?

edit: Sorry, it's actually the GNU General Public License (GPL).

asymptotic··on Rate my résumé, I think it's quite good.
RE: your GitHub section on the right hand side. I couldn't care less how many repos you're watching. I care about what you're committing, its quality, and general use by some (any) community.

However, putting such details into a CV is way, way too specific, IMO. From a perspective of a recruiter, they have literally 30 seconds to be impressed by your CV. How are they possibly going to be able to evaluate the quality of GitHub commits from the top two or three screenfuls of your CV? As an alternative, consider adding links to particular GitHub commits as proof of some skills, e.g.

"I've added end-to-end encryption to ZeroMQ, here's the GitHub commit and a blog post to prove I'm not a charlatan".

asymptotic··on Why you should never ask permission to clean up code.
I'm surprised noone pointed out this post from Sriram Krishnan, a product manager at Microsoft:

Stuff I've Learned at Microsoft http://www.sriramkrishnan.com/blog/2009/12/stuff-ive-learned...

"Ask for forgiveness, not for permission ... Any sufficiently large institution has something to lose...Corporate systems are optimized for saying no. Maintain the status quo. No risk of failure and a spectacular blowout...This is exactly why you are better off going ahead and doing something without asking first. If you don’t ask, no one can tell you to not do it."

I'd argue that the specifc principle "never ask permission to clean up code" can be generalised to "never ask permission", especially for software houses that have grown large and sclerotic. But YMMV; in a previous job I once told my manager I had an exciting idea for an automated test platform that I'd be willing to implement and test in my free time. His response was "And when you're finished, who's going to maintain it? I'd need to hire someone at least as skilled as you to keep it running. Please don't make it."

asymptotic··on How Software Will Redefine Networking
For some reason the whitepaper link on the main OpenFlow website is broken, so here is:

- a Coral cache version (http://preview.tinyurl.com/5sr9vsc) - the Google cache version put through Quick View (http://tinyurl.com/6hxyxz2)

The GigaOM article was far too basic and vague for me, so the white paper proved to be a breath of fresh air! Whereas the GigaOM article flounders over explaining potential commercial applications for OpenFlow, the whitepaper takes a far more humble approach:

"Today, there is almost no practical way to experiment with new network protocols (e.g. new routing protocols, or alternative to IP) in sufficiently realistic settings (e.g. at scale carrying real traffic) to gain the confidence needed for their widespread deployment...a more promising approach [then contemporary commerical and research solutions] is to compromise on generality and to seek a degree of switch flexibility that is:

- Amenable to high-performance and low-cost implementations. - Capable of supporting a broad range of research. - Assured to isolate experimental traffic from production traffic. - Consistent with vendors' needs for closed platforms.

This paper describes the OpenFlow Switch - a specification that is an initial attempt to meet these four goals."

asymptotic··on XOR Swap - Stack Overflow for Tech Interview Questions
I think this project would be far more useful as a computer-science-version of Project Euler (http://projecteuler.net/). People could then compete on full, working implementations of common interview questions in a variety of languages, that must execute on e.g. Codepad (http://codepad.org/), rather than posting what seem to be really wishy-washy, hand-wavy answers to puerile questions.

Then, perhaps with strong moderation, only questions that demand some compromises should be accepted. e.g. implement a container that can be traversed both forwards and backwards. What are the complexities of your container? How could you improve X, and what would the cost be? etc.

← PreviousPage 4 of 4