2,116 karma · joined Aug 14, 2007 (19y ago) · 566 submissions
comment 18y ago · link · parent
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
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
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
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
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
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
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
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
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.
37 points · by rcoder · 18y ago · 11 comments
comment 18y ago · link · parent
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
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
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
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
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
comment 18y ago · link · parent
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
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
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
comment 18y ago · link · parent
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
comment 18y ago · link · parent
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
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
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
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.