News for hackers. Stuff that matters.
Re:Building OS X Apps with JavaScript by jonesetc on Sunday September 28, 2014 @11:55AM (#8380031)
This is an interesting thing that has cropped up in interviews with my company. The company is mostly made of C++ guys (lots of game and sim dev), but we have recently started on some web projects and we seem to have no idea how to evaluate interviewees.

Personally, I am a recent grad (last May), but have focused on web dev in my free time. However, having gone through formal CS I do know a good bit about the low level data structures and bitwise operations. Some of the interviewees have been developing for over a decade and can't say what a linked list is, let alone contrast it with vector or an array.

It is all, anecdotal, but we've seen a fair amount of correlation between ability to solve simple problems (writing simple functions with no expectation of optimization) and knowledge of these entry level CS topics. So as much as I feel like we are testing for the wrong things when we ask about simple bitwise operations or linked lists when interviewing for front-end JS guys, it has still been a good test for us.

All of that being said, this post is definitely well written and interesting. It is odd to me that an author who seems interested in learning and trying something new would so actively choose not to know what the code he's writing (and telling the reader to write) is doing.

Re:Building OS X Apps with JavaScript by thegaw on Sunday September 28, 2014 @01:16PM (#8380280)
I wrote the post. I'll speak to that last part. I commented elsewhere in the thread about this too. I included the part about not knowing for two reasons.

1) I couldn't figure out a way to write an explanation of the bitwise OR operator that was terse enough to not derail the main topic of the article while still making sense. The post isn't a tutorial about bitwise operators, it's about building JS OSX apps. It's a long post, with a lot of concepts. I didn't want to add two or three more paragraphs to explain something that was non-essential to the task at hand.

2) I wanted to show vulnerability in myself. I could have left out the two sentences in question, they were also non-essential to the main topic. But, I knew this post was going to garner attention. I wanted to show–by example–that it’s OK to not know things and to say, "I don't know."

I didn't foresee this much discussion about it, but I think it's good. Look at all the great information about bitwise operators in this thread. There's also a good explanation in the comments on the post. Those comments would not have been made if I chose to leave those two sentences out.

Thanks for reading the post and commenting.

Re:Building OS X Apps with JavaScript by jasode on Sunday September 28, 2014 @01:35PM (#8380342)
> I didn't foresee this much discussion about it, but I think it's good.

Your comment about not knowing bitwise OR was fine.

I looked at your blog and could easily see that your background is designer (HTML+CSS) and then programmer (Javascript, Ruby, etc). If anyone reasonable keeps this in mind, they would actually be surprised if you did know what bitwise OR was because a developer who built knowledge in that sequence wouldn't need to come across it.

There are large swaths of programming communities that don't come across the bitwise OR topic. This includes ERP (Enterprise Resource Planning) programmers such as SAP, PeopleSoft. Linux/Windows admins writing bash or Powershell scripts. The office power user writing Visual Basic macros for Excel spreadsheets. And of course, many web developers. All these folks are productive doing "programming" and yet they get by without bitwise OR.

When a programmer is surprised at why developers of <insert_whatever_technology> doesn't know <insert_whatever_knowledge_he_happens_to_know>, it's often because he forgets that others interface with programming tasks quite differently from him.

A typical type of programmer that would know bitwise OR is a C/C++/assembly programmer. But even within this group, there would be knowledge that one C programmer would be "surprised" that another C programmer doesn't know. For example, a C programmer might not know the intricacies of the Link process. Well if that C programmer was a university student that only used the C language to write 500 line programs to calculate matrices for his science experiments, he may not know the subtleties of the Compile & Link. To him, it's all just a black box to spit out an executable file. When he needs to know what "can't resolve symbol" error means, he'll learn what the LINK in COMPILE+LINK actually does.

Re:Building OS X Apps with JavaScript by jonesetc on Sunday September 28, 2014 @02:35PM (#8380524)
I saw your other comment, and I'm glad to see your comments line up with my general feeling of your voice and attitude in your post. The only reason I make any comments on it is because the general attitude of learning and experimenting was great and that one part just seemed like a sudden break from it.

I agree that a real explanation would have been out of scope and probably even more odd. My only suggestion (not that it is really better or you want it :) ) is to to pay it lip service with something like, "The syntax is odd, but it is just specifying options with a bitwise OR" With the "bitwise OR" as a link to documentation for the cocoa options or some article explaining bitwise operations.

Most importantly, it was a good article and I'm going to do a little bit of research for myself on writing these simple OSX apps with JS. First thing is to figure out just what is required for these applications and try to decouple it away from that script editor.

Re:Building OS X Apps with JavaScript by petercooper on Monday September 29, 2014 @04:06AM (#8382026)
I wanted to show–by example–that it’s OK to not know things and to say, "I don't know."

And I really appreciated that. I think far too many people (including myself, at times) give the impression they know more than they do and I see how intimidating it can be for beginners to think everyone fully groks X, Y and Z and is way ahead of them when the real picture might be quite different.

There was a lot more of this sort of honesty back in the earlier days of programming blogs, but then all the "you've blogged something totally obvious!!" assholes turned up. I hope we can get back to people just writing and sharing what they want without people assuming admitting ignorance or not being a 100% expert in a field makes one unsuitable to write about that field.

Re:Building OS X Apps with JavaScript by javajosh on Sunday September 28, 2014 @12:57PM (#8380213)
> Some of the interviewees have been developing for over a decade and can't say what a linked list is, let alone contrast it with vector or an array.

Jaw dropping. Some degree of this is acceptable - e.g. I wouldn't really expect a front-end dev to know browser-native DOM manipulation, because everyone uses some sort of shim (particularly jQuery), and modern-modern frameworks abstract away DOM manipulation entirely (think React). But that's a high-level API trade-off, rather than a foundational issue. OTOH it's far more serious when a dev doesn't know about Array.forEach and insists on using $.each for iteration, showing an inability to distinguish between native JS and jQuery.

Part of the problem with JS and data structures in particular is that, AFAIK, there is not even a de facto collections standard. Google's Closure structs[1] might come the closest, but generally brings a lot of baggage. js_cols[2] is pretty good. And then you have what I would consider "fringe" solutions like mori[3]. The bottom line is that even an autodidactic developer starting off in JavaScript land is going to have a much harder time learning about basic data structures than if they started off in Java land, which, while it has it's warts, does have a wonderful standard library for collections[4].

[1] http://docs.closure-library.googlecode.com/git/namespace_goo...

[2] https://code.google.com/p/jscols/

[3] https://github.com/swannodette/mori

[4] http://docs.oracle.com/javase/tutorial/collections/index.htm...