HNHacker News
TopNewBestAskShowJobs

brooksbp

658 karma · joined November 19, 2007

submissionscomments
brooksbp··on What do hackers think of PHP?
As a language for developing applications, PHP really isn't that bad. It has pretty damn good support for OOP (at least within recent releases). It lacks in concurrency support and other random things like namespaces (for which swombat advised against large-sized sites).

As a language for scaling... not too shabby. Many people who bash PHP for inability to scale really don't know jack shit about what they're talking about. Chances are, their app is slow because of all the O(n^2) loops... and they need to go take a class or two on algorithms, networking, and/or distributed systems.

I used to work with PHP a lot... eventually moved to Python simply because it was more succinct. Our teams are extremely small, and we needed a more expressive language; needed to get more done in less time. The rest speaks for itself...

We actually have moved from 100% PHP to: python for web apps, decent amount of Io & Ruby for utilities/monitoring and such, and working on a load balancer in Erlang... much more powerful development. And we really haven't run into many major stability problems...

brooksbp··on Killing Twitter Before It Can hurt Us
You're thinking too qualitatively; imagine the spikes they get... Also most apps are I/O restricted, not CPU...

Also, all these proposed messaging architectures are somewhat flawed. Twitter isn't really "sending" messages to other people. It's more like a person's message history is bound to their account, and appropriate privileges are applied. Then, when people try to "read," privileges are obeyed and information is produced...

Am I the only one who believes the solution to Twitter does not involve a massive distributed system? Twitter is inherently centralized... people don't see that.

brooksbp··on Killing Twitter Before It Can hurt Us
"This means the open source community will almost certainly be more clever about the solution that one tiny closed source company because there will be lots of heads focused on an easy to understand problem."

To be honest, I have to completely disagree. Lots of heads is not a solution to a pure computer science problem. Most companies are formed around a specific solution to a computer science problem. They then make everything proprietary and profit.

That's like saying, only smart computer scientists exist in the open source world. Not true. In fact, you simply cannot claim that there is a strong trend in one or the other. Many smart brains in open source... Many smart ones in industry as well...

brooksbp··on Erlang: It’s About Reliability
"They come for the concurrency but they stay for the reliability."

Perfect.

brooksbp··on Evan Williams: Twitter not abandoning Rails
Recent downtime (the 500 errors) caused by rebooting database servers...

I just did a double-take... rebooting servers... really? really??

http://blog.twitter.com/

brooksbp··on Larry Page on how to change the world
"Even when we started Google, we thought, "Oh, we might fail," and we almost didn't do it. The reason we started is that Stanford said, "You guys can come back and finish your Ph.D.s if you don't succeed.""

So true. Society has formed a horrible notion of stressing the importance of earning your degree(s) right after high school and in consecutive order.

brooksbp··on Are you addicted to (email, the web, coffee, alcohol, etc.)?
I clinically have a significant sign of addiction towards email, the web, coffee, alcohol, weed, snowboarding, listening to music, and the best... hacking!!!

Should I seek help?

brooksbp··on Boulder, Boho Paradise (probably useful for anyone who might be applying to TechStars)
Good article. Great pictures.

I'm a CS/ECE undergrad at University of Colorado at Boulder (CU) and love it. To be honest I'll second anything positive that's said about Boulder; great environment.

brooksbp··on Secure File Upload in PHP Applications
Pretty much... more along the lines of that users should only interact with specified UI. Hashing filenames abstracts the media (files) from the user, leaving the application to deal with managing said media.

E.g. If Facebook were to store profile pictures as the users' name, people would be able to access images based on altering a URL. The HTTP protocol (most likely) wont know if the current user entering the URL has "permissions" or "is a friend of" the picture it is requesting from the server...

brooksbp··on How is your refactoring done?
Find & Replace...

Eclipse has some nice tools that automate processes like pushing up methods into superclasses etc... so if you're looking for commercial 'tools', look no farther than Eclipse.

Still, do not underestimate the power of a sound mind and a good text editor. Personally, I hate how "refactoring" is being marketed these days; mostly caused by the managers/business side of software engineering. To me, refactoring is nothing more than reviewing code, cleaning it up, using better algorithms, altering for better readability/writability...

"The aim of our studies must be the direction of our mind so that it may form solid and true judgements on whatever matters arise. We must occupy ourselves only with those objects that our intellectual powers appear competent to know certainly and indubitably." Descartes

brooksbp··on Secure File Upload in PHP Applications
By one-way I mean md5 or sha1. They're extremely useful for one-way validation in cryptography/security. Applications of these are storing passwords (e.g. normally you should salt and hash passwords before storing them in a database) SHA is usually stronger (~160 bits) than md5 (~128 bits). Although, weaknesses have recently been found (~2005?) in these algorithms; it's easier than predicted to find hash collisions. NIST is sponsoring the creation of successor functions to these current one-way hashing algorithms.

http://en.wikipedia.org/wiki/SHA_hash_functions

http://developers.slashdot.org/developers/04/12/07/2019244.s...

brooksbp··on Secure File Upload in PHP Applications
One thing this doesn't touch on is using a one-way hashing algorithm on your file uploads. This allows your application to do another layer of verification. This also obscures filenames so that they cannot be easily indexed (e.g. Google search engine...)
brooksbp··on 1 in 5 undergrads is constantly stressed
I agree with this article. I find that it's hard to manage college courses, a part-time (~10hrs/wk) job, stay active (weight lifting), a social life, and staying up to date with tech and hacking on my own side projects. It's ridiculously hard to stay in a good mental state of mind while trying to balance it all let alone judge whether you have too much on your plate.

And to be completely honest it is tempting and helpful to sometimes turn to drugs. I find myself taking sleeping pills because I can't sleep at night. Adderoll to stay focused and be productive and maryjane to relax on my freetime. I know this all can be fixed with proper lifestyle... but it's nearly impossible to dig out of said hole...

brooksbp··on Are MacBooks Just Trendy?
I believe the majority of OS X hackers fall into the latter category. I know I sure like my nice GUI ontop of this unix 3.0 OS... not to mention quality hardware build, nice screen resolution, ports galore, decent battery life, web cam, and nice keyboard buttons...
brooksbp··on New Google source code browsing tool
Actually more interesting is their performance in scaling Google Code within the past couple weeks. Huge performance boosts!

I find that their syntax highlighting is quite quirky... sometimes it's incorrect. Colors aren't too great as well...

Functionality-wise it's great. Diffs are awesome to view. Easy UI

brooksbp··on Ask YC: Good compiler books?
Can you please elaborate? Link?

I'm really interested in Python, Ruby, JavaScript... Not looking to write a massive, enterprise-scale compiler/interpreter/parser/whatever in C, C++, or Java... possibly Java... but you get the point...

I've been checking out projects like Mozilla Rhino, Pypy, and keeping up to date with ECMAScript 4 progress... just want a solid book or two or more... :)

brooksbp··on Ask Hackers: How to become the best JavaScript programmer? (q by 12yr old)
His alias is "Javascripter"... he wants to be the "best in the world"... he's 12 years old... just the overall wording taunts me with a hint of spam.

I don't think a 12 yr old would have that enthusiasm for pure javascript.. would definitely ask about HTML (if he knows html he knows how to find out about javascript?)...

what 12 year old knows about YC.news?

Seriously... I'm calling this one out... spam.

brooksbp··on Ask Hackers: How to become the best JavaScript programmer? (q by 12yr old)
Am I the only one who suspects spam?
brooksbp··on CU Open Source Group... move over Berkeley, MIT, Stanford, Harvard...
It's a really clean, laidback, thriving, liberal environment
brooksbp··on Ask YC: Ideal Laptop Screen Size for a developer?
I have a 15.4" and it's suitable for travel. Though, I'm a huge fan of multiple screens / OS X Spaces (X alternatives).

There's just no way one screen without multiple screen emulation or external monitors will 'feel' right. Need more pixels!

brooksbp··on Ask YC: What tools are you using to monitor a site's load?
Google Analytics

I believe using anything relatively more intensive is not worth the cycles. Even 'top' is taxing at times.

brooksbp··on Ask YC: is networking class worth it?
I find that I learn things easier and deeper when I'm not forced to. Forced meaning I have to learn some person's way of learning the material, I have to know what someone thinks is the most valuable knowledge of the material, I would be influenced by the person basically...

Then again this theory of learn is completely out the window when it includes someone of expertise. I would be much happier and consistently motivated to take an intro to high-level programming class from Guido (Python) than some recent grad student.

brooksbp··on Ask YC: is networking class worth it?
Calculus has very little to do with Computer Science. I meant that Mathematical Logic will probably exercise your brain better than Networking for something like Digital Logic/FPGA design.
brooksbp··on Ask YC: Good/small open source projects to work on?
Yeah. I really should have rephrased what I was trying to say. I know what I like: code style, languages, community, etc... I just want to branch out and poke around and see what other people are working on. I want to broaden my horizons if you will :)

Thanks for the input and sharing your guys' own projects / suggestions!

brooksbp··on How can I learn to scale my project?
Good book, but it's somewhat bias. Not gonna go into details, but definitely worth a read.
brooksbp··on Ask YC: is networking class worth it?
I really wouldn't worry about which class to take. Both are important. Too bad you don't have time to take both (assumption). Networks might be more "practical" if you're applying for a job at Cisco. Logic might be more practical if you're applying for a job at Xilinx. Both would be practical if you're applying at Google. I would suggest that you take the one you're more interested in. Personally I would choose the networking class, and it might be more applicable when you start hacking at your startup... but take logic if you like it that much. Don't waste $$$ on a class that you're not as interested in -- especially when you have the luxury of choosing between two CS courses.

Also - don't stress over it. It's your last semester, you'll have the rest of your life to learn whatever you didn't learn at Uni.

brooksbp··on How can I learn to scale my project?
1) Profile. You really shouldn't start blindly optimizing code without profiling. Profile it, find your bottlenecks, optimize, rinse, and repeat. You should also benchmark your hardware; run scripts that make requests to your www server. Check out Apache's ab benchmark. Etc...

2) Cache. Google "Memcached". Django has support for this. This will alleviate huge database bottlenecks (if your app is read heavy). Also possibly consider some sort of FS (file-system) structure specific for your app. It looks like you deal with a bunch of media files, that could get hard to manage without a proper FS plan.

3) Write clean code. There is no sense in profiling, optimizing, caching, etc if your code is horrible. Those things will lead to even worse, unreadable, unmanageable, possibly slower code.

From your description you asked slightly more specified questions, but you really need to understand the basics of above before specializing for your app. At least that's what I believe.

brooksbp··on Ask YC: How do you transfer input to and output from a widget in an iframe?
IFrame (Wikipedia): an HTML element which makes it possible to embed another HTML document inside the main document.

Widget (Wikipedia): a portable chunk of code that can be installed and executed within any separate HTML-based web page by an end user without requiring additional compilation.

What exactly are you trying to ask? You can certainly exchange data via a database and 'make it feel interactive' between the frames using JavaScript/AJAX.

brooksbp··on Is this burnout? Why?
Ditto. I'm sitting in the university library. Linear Algebra final in 1.5 hours. And I'm reading Hacker News...
brooksbp··on Ask YC: What's the best way to resize images for web applications?
What about PHP?
← PreviousPage 8 of 9Next →