Better HN
topnewbestaskshowjobs
Log inSign up

rcoder

2,116 karma · joined Aug 14, 2007 (19y ago) · 566 submissions

Submissions

comment 18y ago · link · parent

If you haven't done web development with Java/Struts before, you actually may want to reconsider whether taking this project on with a tight deadline is in your best interest. The tool ecosystem is very different for the Java web developer, and I'm afraid you may find yourself spending more time reading API docs and puzzling through XML configuration files than actually writing code.

If the client wants Java/Struts code for a good reason (like they have in-house programmers who can maintain Java webapps) your first Java project may not be up to the standards they expect. If they want it for a bad reason (say, because the CIO read about it in an in-flight magazine) then you should be able to push back on the decision and choose a framework with which you're more comfortable.

comment 18y ago · link · parent

That's a pretty astonishingly limiting question, but I would recommend that you go for Java, if you're only going to do one systems language. As a new programmer, (which I assume you must be) the "power user" features of C++ (pointer arithmetic, templates, operator overloading) are going to be more confusing than useful.

Really, though, if you only have time to learn one language, make it something you can get some real use out of early on, like Python, PHP, or Ruby. Learning C++ or Java alone could be more of an exercise in masochism than anything else.

comment 18y ago · link · parent

My small team (two network people, one sysadmin, two devs, one manager) gets a lot of mileage out of DokuWiki for project and systems documentation. It's fast, has good plug-ins, and stores pages in the filesystem, which we consider a plus because it makes backups and versioning a snap.

When we're collaborating with larger groups, though, we tend to pick Redmine by default. It offers a nice combination of ticketing, project management, and documentation features, without the learning curve of a traditional wiki or the deployment headaches of something like Confluence.

comment 18y ago · link · parent

(Note: by "helps" I assume you mean to suggest that grad school should restore the humility that the workforce fails to inspire in programmers. If that's incorrect, then we are in fact 100% in agreement.)

Only if you're in the right graduate program. There are a lot of MS (and even some PhD) students in CS departments who are just looking to increase their base salary.

Furthermore, I've found that taking grad-school classes part-time is kind of an unfair advantage vs. being a full-time student. While I have time to really explore the material for the one or two classes I'm taking at once, while the full-time students are carrying a heavier course load, and TA'ing or teaching at least one more class, even if they're not working on their thesis or dissertation.

comment 18y ago · link · parent

Your cover letter is your introductory email. (You're not attaching a PDF or anything, are you?) It should be conversational, well-edited, and concise, but should give the reader some reason to continue on to the resume.

As for when to start culling old info from your resume: I think you have the right idea in thinking that you should stick to those points that are directly relevant to the position. Padding your experiences and skills with high school activities may help when you're fresh out of school and have little or no professional background to reference, but if you've had even one full-time job in the industry, drop the kid stuff.

I haven't been on the interviewee side in a while, but from the interviewer POV, I personally like to see that applicants have made an effort to anticipate the office culture and dress appropriately. Seeing someone in a suit + tie when interviewing in a room full of people wearing T-shirts suggests to me that perhaps they aren't great at prediction based on incomplete information, and instead chose to "play it safe." That can be a desirable attribute in some positions, but it doesn't speak well of their ability to empathize.

If you want to find out whether you're going to get dinged for not going formal with your interview attire, do some research. Check the 'About Us' or 'Staff' page on the company website, or check out staff members' blogs and Flickr photos. Maybe on of the senior staff have presented at a conference recently, or podcasts from their office?

comment 18y ago · link · parent

Actually, at any given time, a large number of the "hardware" operations being passed to a modern CPU are actually being "interpreted" using the microcode implemented on the CPU itself.

Even in the case of instructions which do map directly to hardware ops, the CPU is still doing branch prediction and prefetching, which implies that the code is being examined (i.e., "interpreted") before being executed.

I'm not trying to say that performance isn't better when funneling native instructions down to the CPU; rather, just that it's worth remembering that there's really no such thing as "[running] on bare metal" any more, at least on a modern x86 ISA system.

comment 18y ago · link · parent

> Are they coding to a spec? If you're outsourcing you better be or you're just asking for trouble.

I see these two as quite distinct. Coding to a spec, even at the level of BDD, simply means making your implementation conform to some abstract behavioral specification.

If writing code that could both adhere to such as spec and was easily maintained and extended in the future were easy, then outsourcing (or simply relying on the most junior programmers you could hire) would definitely be the only sane way to build software.

Unfortunately (or fortunately, if you are a developer who wants to work and knows your craft) it is not nearly so simple. Even a perfect functional spec is usually at least 3-4 levels of abstraction removed from the actual code needed to implement it.

More fine-grained BDD specs or unit tests may come closer to allowing for mostly mechanical translation into working code, but they also must co-evolve with the code itself.

comment 18y ago · link · parent

> For me though, the biggest surprise of the keynote is that only 4000 developers are out there.

You mean, only 4000 developers were approved by Apple. Over 250K downloads of the SDK and 25K developer key registrations says to me that the bar is being set pretty high to qualify as an authorized iPhone dev shop.

comment 18y ago · link · parent

Vim is massively useful for one simple reason: remote editing. I use BBEdit and Emacs for local files, but when I need to SSH into a remote server, there's nothing quite as fast and easy as firing up Vim to edit a config file.

comment 18y ago · link · parent

I'm less concerned with cramming as many users onto a single box as possible than I am with insuring a high quality of service for each active user.

If you have 5000 concurrent sessions in a single OS-level process, you better have some pretty damn good fault-recovery mechanisms built into that process.

When you get right down to it, this is the same basic argument gets used to support Erlang: namely, that it supports large number of cooperating, isolated processes, rather than shoving everything into a single monolithic server.

I trust that the Linux (or BSD, Solaris, or other reasonable OS) kernel can handle scheduling a few thousand processes smoothly, so long as those processes fit into available RAM.

What kills big Apache (or other fork()-driven) server environments isn't context switching between backends, it's swapping.

That being said, you're right about it being all about scale. If you're like Google, or Facebook, and can afford to hire engineers who do nothing but worry about scaling to 10K sessions on each HTTP host by moving your critical-path code into hand-tuned C++ or Java inside the polling server, more power to you. If you're in the normal world most of us live in, where scalability via hardware is more economical than via developer time, then fault isolation may prove more useful than raw throughput.

491.

Instant Karma(twitter.com ↗)

37 points · by rcoder · 18y ago · 11 comments

comment 18y ago · link · parent

Forive the reductio ad absurdum, but it seems that by your argument, we'd all be better off simply implementing our webapps within the init daemon, and handling all scheduling and resource-protection within our application logic.

Personally, I like having my orthogonal processes running in isolation from each other, mediated through a tested, scalable kernel.

Obviously, there's a balance to be found between needless context switches and dangerous coupling of function, but I've found that, as often as not, a process context per user is actually a pretty good point to come down on within that continuum.

comment 18y ago · link · parent

> Why wouldn't you be able to virtually always do a better job of scheduling events (when you control all the code competing for resources) than a generic OS scheduler?

Simply put, I would say that "you" (where "you" is an average webapp developer) probably don't understand scheduling, event-driven programming, or memory management as well as the average kernel developer. I of course don't mean this to extend to anyone in this thread. Imagine, though, giving your average PHP or ASP developer, who may struggle to implement a basic sort algorithm, the problem of implementing cooperative multitasking in a scalable way.

> Do you know of any examples of ultra highly scalable fork()ing servers?

Under real-world workloads, I still consider Apache to be "highly scalable." In my experience, given 1:1 investment in hardware for front-end and database servers, the RDBMS craps out long before the webapp, so being able to accept another 5000 incoming connections is only going to hurt you.

comment 18y ago · link · parent

The problem is that, in the real world, monolithic polling network servers have to manage all the transaction-specific context for your application in a single binary.

I'm not challenging the fact that the C10K architecture wins if we're talking about static content. Real webapps don't live and die by their static content performance, though: the critical path is through the dynamic content generation, which means that select()/poll()/et. al. don't buy you much, unless you can hook your database client events and application thread scheduling inside that loop as well.

Green (a.k.a. userspace) threads are one good solution, but fork() isn't the performance-killer that people seem to think it is, either.

comment 18y ago · link · parent

This is only true if you think your application can do a better job of scheduling than the underlying OS kernel. In many (if not most) cases, this is false.

For HTTP servers hosting static content, you may be able to out-perform the OS thread scheduler. For most non-trivial apps, you're probably wrong.

Small fork()-ed processes can still compete with clever poll(), /dev/epoll, or kqueue()-based servers, if you can keep each instance lightweight.

comment 18y ago · link · parent

Apache buys you two things: rock-solid, time-tested stability, and millions of words of writing both online and in print about administration and tuning.

Lighty and Nginx are both (like thttpd) leaner, potentially faster, and "sexier." Neither has the proven stability or community that Apache does, and neither is going to help much if your bottlenecks are at the application layer, rather than just shooting raw bits over a network cable.

comment 18y ago · link · parent

I deployed a low-volume production service on webpy a couple of years ago, and haven't had to pay more than cursory attention to logs and patches since then. That's fine with me, especially compared to, I dunno, Rails or PHP, where you pretty much have to apply some critical security patch every 60 days, or upgrade to handle the latest RESTfulEncryptedAgileCookieStoreAjaxWidget API.

comment 18y ago · link · parent

"Strongly-encrypted channel" basically means VPN in my book. If the phpMyAdmin server isn't on a publicly-routable IP, and you don't have the VPN tunnel open when you aren't using the secure host, then it will in fact defeat CSRF.

comment 18y ago · link · parent

Nope. Another miss.

Good cooks can imagine flavors and guess at timing and ingredients for food they've never tasted (much less prepared) just as good painters can visualize a work in their head before ever putting brush to paper.

Programmers should be able to work the same way.

comment 18y ago · link · parent

> Of course they are doing this to "protect the user", and their "network", which is total b.s.

I'm no more a fan of the vetting process that mobile apps have to go through than anyone else, but this particular piece of FUD actually bothers me quite a lot.

Imagine if J2ME-equipped handsets were subject to the same sort of malware ecosystem that, say, Windows boxes are. Now, add to that the fact that an 0wned mobile device is an automatic money-maker for the black hats, (think 1-900 numbers) and I think there's a very good reason for carriers to be nervous.

comment 18y ago · link · parent

Both my current handset (BlackBerry Curve on T-Mobile) and my previous one (Sanyo MM-7500 on Sprint) supported "over the air" installation of 3rd-party J2ME apps.

Many of the applications the poster described as not working (Google Maps, Opera Mini, etc.) worked just fine out of the box on both handsets.

Sorry, but this was more whiny than informative.

comment 18y ago · link · parent

Actually, the solution is not to ever use phpMyAdmin on a public web server. Just like Webmin, and every other tool that has god-like power over critical system resources, it should be on a private IP, accessible only from trusted systems via an encrypted, strongly-authenticated channel.

comment 18y ago · link · parent

If you're using HTTP Basic auth, your browser will happily cache the credentials and re-submit them every time when asked for the same server/realm combination. You'll need to restart your browser to clear the cached auth data.

comment 18y ago · link · parent

All three work if your goal is simply to avoid forking a new Python interpreter for each incoming request, ala CGI.

The difference is in where they hook into the request-handling workflow within Apache. Both FastCGI and WSGI apps only receive the request after Apache (or lighttpd, nginx, et. al.) have finished doing access control checks, URL rewriting, header parsing, etc.

Code inside the mod_python interpreter, on the other hand, can hook in to any of those earlier stages of request processing, which allows it to do things like block a request, alter the Apache log format, or look up a vhost docroot in a database, all before any content is generated.

The downside is that each and every Apache process on your server has a full copy of the Python interpreter embedded inside, which can cost you a pretty serious chunk of RAM when you start dealing with servers running 25-50 (or more) httpd processes.

comment 18y ago · link · parent

I think there are two potential skills being evaluated here. The first is whether someone can think about and write code without being in front of a computer. The second (and more valuable, IMHO) test is whether they can code without resorting to copying-and-pasting from a tutorial or forum thread.

comment 18y ago · link · parent

While it may be possible to get the same level of control over the request lifecycle using mod_rewrite and simple dynamic content generation, it can often be awkward and slow compared to doing the same thing via a full-blown Apache scripting module like mod_python.

Case in point: I'm currently working on an application that uses mod_auth_kerb to perform Kerberos password authentication on behalf of users, then fork a background server which has access to that user's Kerberos credentials, and proxy future connections from that user to the dedicated backend.

Doing that using mod_rewrite requires using the RewriteMap 'prg:' map type, which introduces a single choke-point in the application: namely, the single script responsible for spawning the backend servers. That script also runs in the one Apache master listener, which means that no other incoming requests will be answered until the rewrite script returns its output.

If I were instead using mod_perl (as I suspect I will be, before this moves into production) I would be able to have each Apache child process handle its own forking of backends for requests it was handling.

comment 18y ago · link · parent

Ruby, as a language, is reasonably compact, and certainly not a big jump for someone with any amount of Perl and OO experience. Rails, on the other hand, is a big framework. You can learn the basics in a few days, but much like PHP, you really can't master the ins-and-outs of the full stack without (at least) several months of regular use.

It's also a moving target: new APIs fade in and out of existence with pretty much every release, and many "best practices" (early RESTful routing, anyone?) are picked up and dropped pretty much according to the whims of DHH and the other core committers.

That's not to say that it isn't worth learning, of course; if you're willing to commit to using Rails pretty much full-time (and work within its limitations) for the bulk of your projects, it offers a lot of great infrastructure to build on. Since it sounds like you want to focus on solo development of web applications, Rails may be just about perfect for your needs.

comment 18y ago · link · parent

That attitude would guarantees that you'll never pick up new skills, or stretch yourself enough to discover what you're really capable of.

Learning new programming languages and frameworks is incredibly important, if your goal is actually to be a well-rounded developer.

comment 18y ago · link · parent

This of course disregards the #1 reason to use mod_python (or mod_perl, mod_ruby, or any other fully-integrated scripting language Apache module): namely, because you're not just limited to generating dynamic content.

The Apache request-handling chain is much richer than simply passing off incoming requests to a CGI or PHP script. Using mod_{perl,python,ruby,etc.}, you can implement authenticators, URL-rewriting modules, log handlers, output filters, etc., and take advantage of the mature Apache infrastructure for such code.

Basically, if you want to be able to slice and dice HTTP requests at every stage of processing, not just the content-generation one, the Apache mod_* add-ons are a pretty powerful tool for doing just that.

1
1516171819