Live data from Hacker News

Web Programming Is Hard

shubharamani.com

131–140 of 165 posts

Re: Web Programming Is Hard

#131
post #104

Earlier quoted context omitted.

Perhaps I've just worked with linked lists too much at this point, but I find it nigh impossible to understand how reversing one could be considered even minimally difficult. "Pop the head of the source list and prepend it to the target until the source list is empty." One sentence, no complex concepts involved at all. If it's unfair to expect someone to answer a question like that in an interview, then I'm not certa…

It's very hard for you or I now, to appreciate what it was like before you learned to think of linked lists as stacks. The point is, there is definitely a leap of insight necessary if you've never thought of things in this way before. I was 12 or so when I made the leap, and I guess I'm slightly lucky that I remember the exact moment for this particular case.

I don't think I knew what a linked list was at age 12, but I don't think you even have to know what a stack is to do this. Just draw it on a whiteboard, and it becomes obvious that you just walk the list and flip arrows. Seeing that linked lists can represent interesting structures is I think an even more advanced concept, but one that is unnecessary for this particular question.

Re: Web Programming Is Hard

#132

Earlier quoted context omitted.

Of course it's doable. Like I said on my website, I need to get off my ass and start coding up linked lists, binary search trees and sorts "til I fucking throw up all over Manhattan". Yes, of course it's doable. I'm no dummy. I can stumble through it on the whiteboard as well -- I'm not deaf, dumb and clueless -- I don't just stand there at the whiteboard listlessly, with blank stares, if that's what you mean. If I p…

Rather than memorizing stuff forever, you could develop your intuitions about data structure design trade-offs and what makes them behave the ways they do. After I learned OCaml, a lot of data structure design seemed obvious . Also, read _Purely Functional Data Structures_ by Chris Okasaki. Unlike (say) CLRS ( http://mitpress.mit.edu/algorithms/ ), it's even a pretty short book.

I'd actually recommend not reading Chris's book in isolation. There are a lot of things that are ugly to do in functional languages (w/ respect to data structures), but are easy with assignment (and of course vice-versa). I'd read Chris's book with Sedgewick (Sedgewick is a super applied algorithms text). This will help give a good balance.

Re: Web Programming Is Hard

#133
post #66

Earlier quoted context omitted.

It's like maintaining a skyscraper built out of Tinker Toys. What I wonder is: Does the following sentence run through the head of every expert in every field? Man, I really shouldn't be getting paid for this. Any idiot could [do X]. It certainly felt true of most of my day-to-day work in graduate semiconductor electronics. It felt true of a lot of biology research. My conclusion is that there are a mere handful of d…

Man, I really shouldn't be getting paid for this. Any idiot could [do X]. Another variation: what I do is not easy but every person practicing in my field can do this just as well as I can. I worked very hard for many years to master my craft and always felt deficient along the way because the individual pieces seemed so daunting as I encountered and dealt with them. Not daunting in the sense of insurmountable. Just…

"It took me 10 years into my career to realize that many in my field (law) were not like me but contented themselves with cutting corners or otherwise coasting along while seeking to avoid the hard challenges."

I remember going through that moment. It puts the quantity of "best practices" chatter into perspective. People say this stuff over and over because it seems so widely ignored.

Re: Web Programming Is Hard

#134

Earlier quoted context omitted.

I would add one thing: get to know HTTP. Even a basic understanding will prevent you from making costly mistakes.

What are a few costly mistakes that can result from lack of HTTP knowledge?

I've seen a number of times when people don't understand the statelessness of HTTP, and try to put megabytes of data in a cookie-backed session--unable to understand why that doesn't work, etc.

This is especially prevalent in .NET land, where there are mechanisms for storing data in hidden forms and hiding the statelessness away from the user.

Re: Web Programming Is Hard

#135
I am not sure which particular flavor of "embedded" the author is referring to, but the argument, in my view, is completely off the mark, and here is why:

The main challenge of embedded is that you are in charge of controlling and managing everything. The developer is closer to the hardware and the cost of things breaking is far higher because you cannot for one second forget about some part of the technology stack that's below you. Everything is suspect, and nothing can be ignored.

On the web, you get used to your automatic garbage collection, your GUI toolkits, your nice browser sandbox with infinite memory that gets automagically replenished, your in-browser JavaScript debugger and all that jazz. You get to enjoy none of it in the embedded systems I've worked with.

Fixing embedded systems in the field is freaking hard, so the quality of code matters is in a completely different dimension from what's on the web today. Now, I am not talking about Linksys router or your iPhone. That's just a fraction of "embedded" devices. I am talking about things that don't have a TCP/IP stack (or any connection to the outside world), don't have a GUI, and are installed at the contractor rate of $1,000/hr and must exist in the field for 10-20 years. There are millions of these devices shipping every month, and they are all around us.

Are you telling me these systems are easier to design than a webpage that can be twiddled with at your whim a million times a day?

Don't downvote just yet! Just so you know where I am coming from:

I am a product manager for a 100K LOC embedded stack that runs in 128K of flash and 8K of RAM. It's all C code, no OS, no toolkits, no MMUs, no garbage collection and no dynamic memory allocation. These devices get 15 years on a single battery and go inside your house. I've also had good exposure (not an expert) to the online technologies the author mentions. Yes, things may be tough to learn (I don't actually believe they are), but the web is a lot more forgiving of mistakes too.

Re: Web Programming Is Hard

#137
post #2

I periodically think "Man, I really shouldn't be getting paid for this. Any idiot could stick these two APIs together." In my more sensible moments, I remember that that idiot only needed to know HTML, CSS, the DOM model, Javascript, jQuery, HTTP (mostly headers and status codes), Ruby, Rails, basic MVC design, Oauth, SQL, SQL performance, five-ish APIs to support the two that needed integration, how to configure and…

My husband's just starting to get into web development in the hopes of being able to do it with me in a few months. He's a C programmer from years back and has a great head for sorting out and designing how an app should run. His theory is solid, and he has real programming experience to back it up.

I've been bringing him up to speed on the web stuff, though, and he's said the main thing that gets him is that he can't just learn a language and build an app. He's got to learn HTML, CSS, JavaScript (the DOM, jQuery), SQL, PHP/Ruby/Python and any accompanying framework we choose to use, etc. and piece it all together.

It's not that he finds any one of them particularly difficult (he's picking up on them quickly), it's just that there are so many pieces to the puzzle that all need to be understood and fitted together (and they often inter-mingle so much that you can't always separate them out and do one, then the other). It's just a large and varied volume of things to process.

Re: Web Programming Is Hard

#138

I am not sure which particular flavor of "embedded" the author is referring to, but the argument, in my view, is completely off the mark, and here is why: The main challenge of embedded is that you are in charge of controlling and managing everything. The developer is closer to the hardware and the cost of things breaking is far higher because you cannot for one second forget about some part of the technology stack t…

You won't get much upvotes as the vast majority of HN readers appear to come from the Web world.

And as someone who made the switch from embedded to web,I find web much easier in 90% of the time.

Sure its hard to learn CSS, but I want to see you learn how to handle Linux's buffer-heads or program a custom dma chip.

Re: Web Programming Is Hard

#139
post #80

Earlier quoted context omitted.

To play the devil's advocate, and I am speaking specifically within the context of web development, what is a practical example of a linked list?

Write a webcrawler that doesn't get stuck crawling in circles. You need to maintain history somehow.

Why a linked list? Wouldn't something resembling a hash table or even a tree be a lot better.

I think with web development a lot of the situations where you would want a linked list are abstracted away. Personally I would be testing people on how they take some kind of design outline and map out how they would approach it. Something like dealing with bringing together multiple API's to would be high on the list, this is becoming a much bigger part of web development.

Re: Web Programming Is Hard

#140
post #2

I periodically think "Man, I really shouldn't be getting paid for this. Any idiot could stick these two APIs together." In my more sensible moments, I remember that that idiot only needed to know HTML, CSS, the DOM model, Javascript, jQuery, HTTP (mostly headers and status codes), Ruby, Rails, basic MVC design, Oauth, SQL, SQL performance, five-ish APIs to support the two that needed integration, how to configure and…

It's like maintaining a skyscraper built out of Tinker Toys. What I wonder is: Does the following sentence run through the head of every expert in every field? Man, I really shouldn't be getting paid for this. Any idiot could [do X]. It certainly felt true of most of my day-to-day work in graduate semiconductor electronics. It felt true of a lot of biology research. My conclusion is that there are a mere handful of d…

We build our computer systems the way we build our cities: over time, without a plan, on top of ruins. — Ellen Ullman
Post reply on HN