440 karma · joined February 4, 2012
K&R was written in a different time, where computing had stricter (but not really different) constraints, but it's still arguably the clearest expositions of the language around.
considering computing hasn't changed that much since K&R was written, it's unlikely your idea of good code differs much from what was done 40 years ago. for example, functional programming, which is the popular dogma today, was invented around that time.
take the good (it's not hard to find in a book like K&R), discard the (perceived) bad, and move on with your life.
Once you know a dozen languages and understand the running themes of computing, it's all sort of old-hat. Ironically, as the field has been flooded with young, inexperienced devs to satisfy market demand, the titles of "software developer" or "nerd" have become social badges to indicate one's intelligence and cutting-edge-ness. We use 50-year-old operating systems and call ourselves innovators.
Maybe, like Groucho Marx, I just don't want to belong to any club that would accept me as a member, but I think that if you're looking to level-up intellectually, studying math and science, but especially math, is the way to do it. I was never good at math, but I've spent the past year teaching myself calculus and the struggle has been well worth the expansion in my world-view.
languages like haskell, lisp, or ruby may make it easy to create new control structures that blend well with the existing syntax, but new control structures don't help if it's still annoying to write, say, very long lines of free-form text -- a problem that xml handles more gracefully than lisp. syntax makes a difference.
i think it's unlikely we'll win a several-orders-of-magnitude decrease in complexity by confining ourselves to the syntax decisions of one language.
VPRI's research has shown that one important method for constructing large-scale systems that can be understood by small teams is to have a pipeline of problem-specific languages that express major portions of the system. they were able to reduce LOC for a typical OS with networking and graphics by 3 or 4 orders of magnitude.
general-purpose languages can't compete with DSLs in terms of expression, and yet we keep inventing them. i think our lack of imagination is starting to show. compilation and language design will need to become much more common-place if we expect to continue scaling up.
a tower of babel in computing is healthy, no matter how much employers want us to be easily-replaceable cogs in an IT machine.
In my opinion, the ability to think laterally is far more valuable than the ability to think 'computationally'. The latter is comprised of essentially one pattern of thinking -- procedural -- while the former opens one to an infinite set of patterns with which to think.
The computer is a decent vehicle for exploring patterns or modes of thinking once you've discovered them, but the goal should be to explore the pattern, not the vehicle.
for one, the fact that there are fewer women than men in any field, computing or otherwise, is neither good nor bad. the disproportionate number of women in nursing is not seen as a problem, but somehow it has become one in tech.
two, as we flood more people into professional computing, the good pay -- one of the reasons given on the wwcode website for encouraging women to enter the field -- will decrease, due to the increased supply of workers. tech is reduced to Yet Another Job, and Women Who Bgurp becomes the next YC startup.
three, the wwcode website argues that diverse teams perform better by increasing collective intelligence -- measured in what units? and when it claims that organizations with the largest representation of women leadership have a higher return on investment, how is that measured? this seems super hand-wavy to me.
lastly, the website's statement about women investing 90% of their income in their communities "when [they] make more" is not only unlikely, but is predicated on the long-term availability of good pay in professional computing, which, as i mentioned earlier, will decline at a rate proportional to the frequency with which we encourage people to enter the field.
* a single, definitive method for creating namespaces without using a framework or library
* a single, definitive method for defining classes and using inheritance without using a framework or library
* a single, definitive method of allowing async functions to modify the state of an object without having to declare that object in the global scope, without using a framework or library
If these problems are already solved, please let me know!
Maybe, once you've found a location to read, insert, or write to. The author neglects the runtime cost required for the hash algorithm itself, which may not be trivial; computing the hash of a string key is typically an O(n) operation.
Furthermore, unless a suitable table size is selected, integer keys (should one use a map like an array) will eventually hash to the same value, requiring even more time to iterate through all the remaining values that match that key until the desired value is found.
"I don’t know why you would ever use [a linked list] over an array (or a hash)..."
Here's why: because arrays take up space whether you use it or not. Linked lists don't suffer from this problem, but at the cost of 1-2 pointers per item. Has the author seriously never managed memory before? Please tell me this article is a joke.