skysight-inc/HackerNews huggingface dataset:
Does Vista have any long-term chance for survival, with stories like this?

Sure, as long as it's forced down people's throats. What else are they going to use? "Windows" is synonymous with computing for most people. They don't know they have other options, they don't want to learn something that looks or feels different, and they are trained to think mistakes the computer makes are their fault.

If Microsoft releases something else, Vista will go away. But it won't go away because users rebel. They think Vista's bugs are their fault, so they just say "I'm dumb" and give up. It's sad.
It is sometimes reasonable to "compress" released code, especially if it can be done automatically and there is benefit to doing so. In the case of JavaScript, the main benefit is that the file download size is smaller.

However, unless there is an absolutely measurable and significant advantage, I find "clever" code to be far more trouble than it is worth. Engineer time is very expensive, and you don't want people sitting and studying code for very long just to figure out how to change it safely.
In general, I prefer more clever code that gets documented extensively. Sometimes you can get too clever and introduce funky bugs.
Ultimately, it comes down to who will maintain this. If you're hoping to pass off ownership of this and let someone else maintain it, go for the longer but simpler approach.

If it's something that you'll be in charge of forever, get as clever as you can :)

Remember the words of Kernighan:
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it."
Any game where some players are not perfect allows this kind of exploiting them - http://www.cs.ualberta.ca/~darse/rsbpc.html
game theory still holds.
Point taken. If I say your experience is the exception that proves the rule, though, I don't think that's too far off.

I had a similar experience until midway through high school. I was about three years ahead of my peers in math, due to the efforts of one particular instructor who encouraged me to get ahead and stay ahead. After my ninth grade, he moved to another school. About the same time, my high school ran out of courses. I ended up taking throw-aways instead of vector calculus, differential equations, combinatorics, etc. for three years.

I wonder if the push towards one-size-fits-all standardized testing has eliminated the possibility of making active learning official, at least in the public schools. Overworked teachers don't have the time to dumb it down and smart it up at the same time, whether the kids could handle it or not. There's a lot of generalizing here, sure, but I think the basic outline is true.

Even my MS seminars were more teacher-directed than self-directed. Maybe I have a knack for choosing the wrong learning situations.
Happiness as Your Business Model
Your problem here is that you're mixing logic and presentation, so it's neither clever nor clear. I'm not 100% sure what you're trying to do (your explanation again mixes everything together making it hard to understand) but I think you want to do this:

- Transform the screen position to a week-based relative coordinate system.

- Convert that spatial coordinate into a time stamp represented as seconds since the epoch.

That's a minimum of two steps, two verbs and therefore two separate functions. Step 1 can be broken down further by introducing helper functions for inspecting the DOM, decoupling the representation of the UI elements from your actual screen-space coordinate system, as CSS isn't in a nicely-scriptable format.

Once you've done this, you'll discover the result to be only marginally longer, but highly reusable.
I wrote this function that converts positions on the calendar (left and right CSS offsets) to UNIX timestamps (and another function that does vice-versa).

This seems like a very bad design. Is it really better than simply attaching a time property to every div at calendar creation? You are coupling presentation and data, which is in general a terrible idea.

Also, you realize that other countries arrange days of the week differently? If you ever internationalize, you will be in a world of pain. If you ever decide you want column width to vary for some reason, again you are fucked.

You can sometimes justify tricky Javascript since download speed is a factor. However, your JS strikes me as probably more wordy and complex than the straightforward solution.

Tricky techniques that exploit tight coupling are almost always wrong.
put back the intermediate variables. just because you don't name them doesn't mean the compiler doesn't have to store temporary results. you might as well give them names so the next person can read this.
It's confusing for me...I had to puzzle it out to understand it, and even then don't fully understand it. If I were writing this from scratch, I'd skip all the pixel computations and instead add "day" and "halfHour" attributes onto the elements themselves as you're building the display (or just attach a UNIX time directly, as neilk suggests). Then computing the UNIX time is just:

this.parent.timeStart.getTime() +
((parseInt(el.attr('day'), 10) * 48) +
(parseInt(el.attr('halfHour'), 10)) * 30 * 60 * 1000;

A couple readability/bugfixing comments on the exising code:

1.) In C-family languages, I really don't like functions that have the closing brace on the same line. I've tried it in my own code a couple times and always had to go back and change it when I went to reread the code. I have no problem with it in Lisp, but it's so different from normal coding C-like coding conventions that it makes skimming the code very difficult.

2.) parseInt automatically skips everything after the first non-numeric character, so you don't need the substr in px2num.

3.) You should get in the habit of supplying a radix argument to parseInt (i.e. parseInt(el.css(attr), 10)), because otherwise it'll interpret it in octal if the string starts with 0, which can lead to very strange bugs.

4.) When you have a known number of arguments, use function.call(obj, arg1, arg2) instead of function.apply(obj, [arg1, arg2]).

5.) In this case, it's probably clearer if you just used an accumulator; using a closure doesn't buy you anything, and means you need to mess with the this parameter.
> Although the detailed listing of MS interview questions he was asked was interesting.

Actually, I thought the questions seemed shockingly easy, compared to the brain-busters I hear about coming out of interviews elsewhere. Pretty much all of them were sort of hand-wave-y open-ended architectural questions, and I would hope the answers would be obvious to anyone with more than a few years of experience.
I recommend Zong.com - They specialise in this and have an API.
This is hot off the wire: a Windows-centric gaming company that gets kickbacks from MS for deploying to their platform has made fun of Apple Inc. This may terrify some people, but please try to control your _shock_ and _disbelief_.
I don't think it really matters who is going to maintain the code in the future. Even if you think you're going to be the sole person maintaining the code for a long time, why is being "as clever as you can" a win? 5 years down the line in a large system, you might not remember the reasoning behind your earlier cleverness anyway.

The complexity in a program should come from the problem it is attempting to solve, not the trickiness of the implementation. I personally prefer code that is as simple as possible (but no simpler, to coin a phrase) -- there are enough things that can go wrong in a complex software system without adding overly-clever code into the picture.

I think one of the primary guiding principles of software design ought to be simplicity: strive to make everything as simple as possible, except where other requirements like efficiency, robustness, functionality, or portability supersede.
Do you feel that you could solve almost any problem (maybe not even technical-based) given enough time?

Without trying to appear super-arrogant, yes.

What I did learn from university, though (I went to Oxford... that probably helped.. hence a "good" university in my previous post), is that there are many people out there who can solve some of those problems a hell of a lot quicker than I can, with less effort - including things I thought myself really good at. That was a lesson in humility and worth the four years it took to learn it.
I don't know if it can be boiled down to one thing. One likes to see mastery at every level, from the high-level design down to strict adherence to coding conventions.

The software has to have a strong opinion about what it's doing. It's modelled the problem in a way which leads to a straightforward solution, using a minimum number of concepts.

According to the conventions of the language in which it was written, the visible structure must reveal the underlying concepts. To a reasonably experienced practitioner, the code documents itself and comments are infrequent.
Qmail, both at a source level and the way the overall system fits together.

See also: http://c2.com/cgi/wiki?GreatProgramsToRead and the linked pages, which discuss your question further.
Yes, I skipped over a few of the specifics. The "Saturday/Sunday" at the end of the week versus "Sunday at the beginning" is taken care of, I was just using that as an example to explain; internationalization works fine. The time property is already attached to the DIV; however, this will be recomputed based on some DOM-change to the event. It makes it simpler, since (for example) when the user resizes the event, I can just deal with the physical resizing of the DOM object, and once they're done, translate it to the timestamp. I'm a presentation/data separation freak to the point of having no Python code include any HTML, and no HTML include any JS (except the <script> tag). However, this is a case where presentation and data are very intimately attached. Maybe I should have explained that I don't use this to get the time of the event. However, when the user resizes the event, at some point that connection between data and presentation has to be made, since their resizing is ultimately caused by pixel-based mouse coordinates. Also, the varying column width is taken care of, as none of this is hardcoded. The vertical and horizontal spacings are computed by looking at offets, and recomputed during window resizing.

Does that make my approach any better? I think that addresses every issue. I agree, though, there are better ways to do this, but this isn't a priority project for me so I haven't put as much thought into it as I'd like. Thanks, Neal.
constantconstact.com. with any list you use don't forget about CAN-SPAM laws.
The pixel computations are done because of the way this is used in the calendar. When a user resizes the event, some kind of pixel computation is going to happen at some point, since mouse coordinates have to be transferred in some way to "left" and "top" offsets (perhaps by first translating to the start time and end time abstractions). This was probably the dirtiest part in that respect, as it is the point at which I chose to translate between pixels into usable data. It's a helper function, so to speak, so I don't have to deal with any of this in my more general abstract code (which does indeed follow the much more "clean" approach). Hence the underline before the method's name. :) (this is part of an object)

1. I agree, but they're tiny inline functions so that's why I did that. I'll refrain from doing that from now on as this seems to be a general consensus.

2&3. Aah, good point. I just went back and looked at an old JS project and noticed I was doing both of these properly with parseInt. I've forgotten though as I haven't done too much heavy Javascript for a while before this. Thanks so much!

4. I've used call before like that but for some reason I forgot about it and switched to apply. Thanks!

5. Ok, that's what I wondered. The comments so far seem to agree this would be better for readability. I don't plan on anyone else even touching this code, so indeed like someone else suggested that could be an important factor, as indeed if this wasn't a personal project I would've used a more orthodox (i.e., less compressed) approach.

That's exactly what I was looking for. Thanks!

EDIT: Also, if I used "day" and "halfHour" attributes they would be hardcoded. Maybe someday I'd like to change to hour blocks, or have a view in four-hour blocks instead of half-hour. I am using this object as an abstract class that handles a calendar view, which will be passed specifics for the view. For example, the day view will be initialized like this:

arguments.callee.$.__init.call(this,
{timeblock:1800, rows:48, cols:1, timedir:0,
startTime:startTime,
timename:'day', container:'daycontainer'}
);

Where the "arguments.callee" stuff is just calling the (inherited) superclass initialization function. This way, if a New World Order appears and ever decides to make 5-day instead of 7-day weeks, all I have to do is change one line of code. ;) (while that's true, the real reason for me doing this is so I don't have to write code 3 times for a day, week, and month view)

That's (partially) why I didn't do something like hardcode "day" or "halfHour" attributes (although I do store all this information in the object--the method I showed above is a computational helper function).
I've been using crm.zoho.com - it has a web-to-lead form, which adds the details as leads in the CRM. I can then contact them via the CRM, or extract them all using the REST API

edit: BTW: it's free
Sorry for not being clear about that. The purpose of this helper method (hence the underline before that name) is to take an event positioned in the DOM and convert its position into a timestamp for that event. Probably the only place this will be called is when some change is made to the DOM of the event. For example, when it is resized, it'll have a different height as well as "top" offset, so that'll have to be translated into a timestamp. I don't know any other way to do this that would be fundamentally different, since at some point the pixel-based resizing is going to have to become a timestamp. Nothing in this function will be used anywhere else, hence I didn't make any more helper functions for my helper function. Thanks!

EDIT: And yes, I agree, if I ever decide to make events more fancy than just dropping in a DIV on the timetable, I'll probably have to do a bit more. But of course, only a couple things will change then, and I can just write those as helper functions for this function.
I'll buy that, but ignoring tact will certainly not help with awkwardness.
Fantastic show! I came away feeling happy just reading it.
Vista Wireless Network Scanner
Collection of 15 People's Google Interview Experiences
Perhaps you could do something similar by having the person transfer a very small amount into the websites bank account - just a few cents, then link that transaction to their website user account --- you should be able to query banks on who owns the bank account if the owner of the web account does something dodgy.
Fred Wilson: Am I Bored With Web 2.0?
The Future of Social Objects - SNSs of 2010 - Part III
I suppose Scarface popularized this as well.

Tony Montana: In this country, you gotta make the money first. Then when you get the money, you get the power. Then when you get the power, then you get the women.
Summary: humans are biased, and contrary to title, game theory still sound.

Recommendation: do not read.
The OCaml interpreter/compiler is really good. Compare with the Ruby interpreter, which is really bad. SBCL is also interesting; has a lot of good parts.
The Sansa, maybe.

http://www.sandisk.com/Products/Catalog(1230)-Other_MP3_Players.aspx
Can't recommend it. Consider reading something like minix instead.

E.g. boot.c

https://gforge.cs.vu.nl/plugins/scmsvn/viewcvs.php/trunk/src...
This is called premium sms. There are lots of providers out there offering a service for this.
Won't this completely break down in a DOM simulator?

It seems like a bad idea to couple data with presentation.

I'm quite honestly dismayed when my team try stupid things like this. I can give a recent example, of where we perform stats from data stored in a grid, where performance of the grid is terrible, and it drags the stats performance into the ground, instead of quickly calculating/caching the stats from the data directly.

If you suggest adding data caching functionality to a GUI grid, I will start crying!
A Google interview isn't really different than other interviewing experiences I've had. A little quirkier and more competitive, but that's about it.
New Desktop Application Brings the Desktop to the Desktop
Ask YC: What do you use for time and todo tracking?
I'm working on a startup with two other guys. We need a way to efficiently keep track of who's doing what. At the moment we're using Trac and we're not really happy with it. Adding new tasks (tickets) is klunky, and tracking time (to predict whether we'll hit our deadlines) doesn't really work either.

I've looked at a lot of different software packages, but none of them are very good. Okay, Basecamp is good, but it's really targeted at the service market. E.g. web-designers or contractors. People with clients and billing and that sort of thing. What I'm looking for is project management for startups. Emphasis on TODOs, milestones, time tracking, and a wiki. Adding tasks to the system should be more convienient than writing on a piece of paper (or in a vim window) - otherwise the system won't stick.

What are you guys using, and are you really happy with it?
"As technology blogging has become defined by blogs like Techcrunch, Gigaom, VentureBeat, Valleywag, PaidContent, AlleyInsider, and many others that are quickly becoming news organizations optimizing around scoops and driving readership, I am feeling that we've lost something, or at least we need to look elsewhere for that magic that was existent back in the first half of this decade."
This is the dirtiest component of going between DOM and the event abstraction (start and end times). When someone resizes the event or moves it, it's going to take some kind of pixel calculations at one point or another, even if they're very generalized, since they used their mouse to do that. This is the point at which I decided to deal with that. Otherwise the events are all handled abstractly. The data isn't necessarily coupled with the presentation, but for example the way they move the event around on the DOM when they're dragging and dropping (presentation) has to be translated into data at one point or another (and so the function is called dom2time--translating presentation to data :).
Return of the ’70s Weirdos
I'm not sure, but I think this effect was mentioned in 'Persuasion' by Robert Cialdini. It's worth reading if you haven't already. His example was a wine list - the waiter first suggests the cheapest wine, which the customer dismisses out of hand, not wanting to look a cheapskate. The waiter then suggests a very expensive wine, and the customer nervously asks if he can recommend anything else. Finally the waiter suggests another wine which is priced between the other two (but perhaps costs more than the customer would originally have wanted to pay) and it seems like a bargain compared with the expensive wine.

He also mentions a jewellery store in a tourist resort which started selling more items when they put their prices up. When the jewellery was cheap, it sent the signal 'this is cheap tat' - when the price was higher, customers started thinking 'this is a quality item' even though the product was the same.

Joel Spolsky has also covered this topic, again it's worth reading if you're not already familiar with it:

http://www.joelonsoftware.com/articles/CamelsandRubberDuckie...
Zimbra, it is pretty decent for calendering and mail. It has todo but I don't really use it. Some guys use AtTask, but honestly I just use a flat file for my todo. But I am just a programmer, so I don't have to juggle as much as a founder.
They've got a linux parody in there as well.. it's something like www.eunuchs.com .. I'll see if I can find it.

The thing I love about GTA4 is that the entire game is just one giant parody. It's great! :)
Why not be different and have an open alpha?
Unnecessary conspiracy theory much? GTA makes fun of pretty much everything.

Actually I'm finding the satire in the latest game to be far too heavy-handed to actually be funny.
Zimbra looks nice. Thanks.

Founder and programmer here. And flat files are really convenient when you know your way around a text editor. But if all TODO systems are so bad we programmers have failed, haven't we? Why can't we have our cake and eat it too?

Edit TODOs quickly as if it's a flat file, and at the same time get time reporting, tags and all the advantages of a structured approach. That's what I want, now I think about it.
I agree that's not much of a twist, but the "looking for developers fluent in Arabic" is a bit of a surprise. Googleplex Dubai?
How Steve Jobs turned Pixar into the most important movie studio of our time
He links to this:

http://discussionleader.hbsp.com/haque/2008/06/a_manifesto_f...

I'm having a hard time separating the above from revolutionary socialism, and the best I can do is simply admit that he's completely ignorant--doesn't understand economics at all, and is just spewing received wisdom like so much bilge from a cracked hull.

Google wants to organize the world's information.

Information has these qualities:

1. It is good.

2. It is mostly unstructured.

3. It is found in uncountable places.

So-and-so wants to "Organize the world's hunger." Hunger has these qualities:

1. It is bad.

2. It is a biological phenomena, rather than a product--something you can create, and then move around, and store, like information.

3. It is found in places with undeveloped economies.

...point is, there is absolutely no comparison. The two words have no points of connection. Information is subject to organization, hunger is not. In fact "organize hunger" is a meangingless combination of words.

So, as usual, when someone spouts literal nonsense, it becomes the reader's burden to figure out what he means. Fine. He wants rid of the invisible hand which has tricked google into benefiting mankind, and he wants to set up planning committees to eradicate (not "organize") hunger. And he wants startups to do this. Okay, that makes sense. Thanks for the viewpoint, Harvard.

Want to end hunger? No, really? Okay, shoot the latter-day communists in Africa, set up strongmen who will protect property, and let capital flow. Period.