Better HN
topnewbestaskshowjobs
Log inSign up

programminggeek

5,207 karma · joined May 21, 2010 (16y ago) · 1,593 submissions

I am a builder. I build lots of things.
Submissions

comment 12y ago · link · parent

Yes, I agree that starting by caching when you have something that could be a lot faster by just doing smarter things with the code in the first place is not the right path to go. However, my point was just that there are many levels of caching going on in a computer and often times developers aren't even aware of them.

For example, how many people write their own file system or memory based caching scheme or jump right to memcache to cache database queries, when they really could just cache the whole page using Varnish or Squid? Just understanding that there are those various levels of caching from processor to memory to filesystem to web server to opcode caching (or JIT'ing) to memcaching to database caching. A lot of developers just flat out don't understand that all of those things exist and what to do make the most of them in the right situations.

comment 12y ago · link · parent

One thing I know is that RapGenius is good about making a big stink, being in the news, and then having things work out in their favor, even if they were the ones doing a dumb thing in the first place.

They freaked out at Heroku with decent reason because it was costing them money, but if they ran their own infrastructure, that would have been a total non issue and at the scale they are running, why ARE they using Heroku?

They did some incredibly dumb SEO things because they are greedy and are willing to cheat to win. That is on RapGenius, but once they got banned it is somehow Google's fault and they should be reincluded? I don't get it.

RapGenius is great at one thing - creating controversy and getting press for it. I guess that works for them, but it seems like a very selfish way to grow a business. Instead of focusing on building value themselves, they are willing to tear down their business partners in public to get what they want.

I'm not sure why this behavior hasn't put them in the same category as Zynga, Groupon, Swoopo, and all the other companies the tech industry loves to hate.

comment 12y ago · link · parent

It's amazing to me how at every level caching helps considerably, and yet it is often one of the last things people seem to optimize.

comment 12y ago · link · parent

Oh fun, I'll have to add that to the list.

comment 12y ago · link · parent

Yep, I did. I'm sure they are some fiddly bits that could have driven it a little higher, but if you look at the tech empower latest bench, the torqbox json rack test is within spitting distance of golang, so I don't think my results are that far off.

comment 12y ago · link · parent

I can't take credit for bench-micro, but I was also really excited when I found it. And yes I'll add grape to the list.

comment 12y ago · link · parent

Yep that's the plan!

comment 12y ago · link · parent

I think there is a subtle, but important thing that the author is missing because, while objectively, PHP as a turing complete language(I believe) you can write basically anything in PHP both good or bad, there is the question of what the language/framework/tools/community allows for or encourages.

In the earlier days of PHP, it was incredibly common to build SQL via strings and nobody thought too much about it. Over time things have evolved and a million little frameworks have sprouted up and it's less of a problem, but that doesn't mean that PHP doesn't have a terrible history behind it of a community not knowing or caring as much about security as they should.

Then, there is the fact that php files just sit on the server and can be executed arbitrarily by just navigating to that file. That is a real security problem in the case that someone is able to upload a php file to a machine. Yes, I know a lot of frameworks make this harder to do now, but by default apache/php lets you do this and you could argue it's one of the real strengths of PHP(ease of deployment).

Last, because PHP is the biggest language it is the biggest target, which means that writing secure code is that much more important. So many PHP projects are open source, so if a vulnerability is found and you don't upgrade your Wordpress or Drupal or Joomla or Magento or phpBB or whatever else app you are running, your site is very likely to be compromised just because you aren't staying up to date with updates, and A LOT of people don't update their software, systems, or packages like they should.

So, PHP from a purely objective standpoint might be as secure as anything else, but the human factors surrounding PHP make it a lot worse in my opinion than other languages/platforms/frameworks from a security standpoint.

comment 12y ago · link · parent

Right now I plan on testing rails, sinatra, cuba, plain rack, probably the frameworks previously benchmarked here: https://github.com/luislavena/bench-micro

I plan on benchmarking on thin, unicorn, puma, WEBrick, torquebox 3, torqbox (torquebox 4), trinidad, passenger, and I guess now Jubilee.

I was also thinking of doing some EventMachine based stuff like goliath and whatever else I can find in that space.

From my early benchmarks last weekend torqbox is the fastest and pure rack is a lot faster than sinatra or rails. Sinatra is not nearly as fast as I thought it was compared to pure rack. A simple thin server running ruby 1.9 got about 1500 req/sec for hello world using Sinatra. Torqbox and jruby brought that to about 5000 req/sec. Plain rack was about 6500 req/sec on ruby 1.9 and thin and on torqbox it was 10,250 req/sec. For reference, my golang hello world was getting 10,500 req/sec.

I'm very curious where Jubilee will land in that mix.

comment 12y ago · link · parent

I am planning a big ruby benchmarking blog post in the next week or so. I will definitely add Jubilee to the existing list of rack servers to test with!!!

comment 12y ago · link · parent

I guess this is s good approach to expose students to various software architectures and what real projects end up looking like. However, I'm not sure that this teaches the students what good architecture is/does and how it evolves over time. Which is to say, I'm not sure that this explanation says that the course teaches students how to DO good software architecture.

Knowing about architecture and doing it in your own code are two different things.

comment 12y ago · link · parent

Yes, because clearly if a bunch of people start using Jolla or Firefox OS surveillance will magically stop happening on the shared public wireless networks we are all communicating over via an open and largely unencrypted internet connection.

Open source is nice, but it doesn't solve anything in terms of government or corporate spy groups snooping. The cat is out of the bag on that one and I don't think they're going to magically stop spending billion or trillions snooping anytime soon. Google/facebook/twitter/microsoft make billions off of spying on customer behavior and serving them ads. Governments have a vested interest in either citizen safety or maintaining power by trying to control the population.

In either case, there is just too much money and power for spying to ever go away or become less sophisticated.

733.

You place an NSA bug in our servers and call it an inconvenience?(twitter.com ↗)

2 points · by programminggeek · 12y ago · discuss

comment 12y ago · link · parent

Hustle. Schlep. Market. Tell people. Get them to sign on the line which is dotted.

There are a lot of things to launching/marketing a product, but it always comes down to hustling and marketing hard consistently over a long period of time. Think 3+ years to be an "overnight success"

comment 12y ago · link · parent

One reason we are in decline is that for better or worse, our own people are a bit too mercenary for our own good. We have built giant multi-billion dollar corporations, which in theory should make us incredibly more wealthy and powerful, but they are no longer American companies, they are global entities that operate in a multitude of countries.

The jobs and profit don't necessarily stay in the USA either. In many cases the best place to hire workers or produce goods or services is not the USA. There are thousands or millions of talented people elsewhere who can do it better for cheaper and the profit that happens off of the difference is not going to come back to the USA.

If you think in terms of the "global" economy, there is no particular reason why the USA would have to stay #1 forever. Without significant effort, it is almost impossible to imagine how America stays on top for the same reasons that it is hard to believe that either Portugal or Great Britain could maintain such large empires from such tiny countries with limited resources.

I don't think USA goes from #1 to #50 overnight, but dropping to #3 or #5 seems plausible.

comment 12y ago · link · parent

This is not at all surprising, they did a dumb thing because they got desperate and greedy.

In the words of DMX, stop being greedy: http://rapgenius.com/Dmx-stop-being-greedy-lyrics

Also, as of right now they aren't showing up on google for "stop being greedy rap genius" https://www.google.com/search?q=stop+being+greedy+rap+genius

comment 12y ago · link · parent

I don't disagree with you at all.

comment 12y ago · link · parent

It is really easy to talk smack about PHP because as a language it is not the prettiest, best designed, or cleanest language out there. It often leads to some very gross code.

However, programmers write ugly code in every language and even in a much more beautiful language like Ruby, there are so many projects that end up with ugly codebases, poor performance, etc. that PHP by no means holds an exclusive ownership of terrible coding practices.

Writing high quality code in any language takes significant effort on an ongoing basis. Practices like TDD, code review, pairing, etc. can help, but only if they are applied with significant effort.

comment 12y ago · link · parent

I believe there is always a niche for well-crafted apps. They might not always be the most popular, but often they have higher margins and more passionate users.

Also, companies like Evernote specifically do native apps because they offer a better experience and that leads to happier users, better conversion rates, and ultimately more money.

comment 12y ago · link · parent

I haven't used Firefox OS, but I've wrote PhoneGap apps for iOS and Android, and the biggest problem is just that it puts the developer experience before the end user experience and that seems backwards to what makes a great product.

Yes, using the same code everywhere is cool, but if it takes longer to load, is less responsive, and has a worse experience, you have saved yourself time, but made something worse.

I imagine it like a 3D printed plastic hammer. If I want a cheap toy for my kids maybe it's great, but if I'm putting a new roof on my house I want a real hammer, forged in steel, etc. You know, so that I can have the best tool for driving nails into wood. I don't care that it would be cheaper/faster to make a plastic hammer, I care about a tool that is great.

I know that properly executed and with enough processing power, maybe performance is a mostly non-issue, but in my experience mobile JS dev isn't there yet and it's not remarkably better this year than last.

I hope this Firefox OS thing works out for Mozilla, but until the perf issues are solved, it's not going to be too exciting.

comment 12y ago · link · parent

Why do this via queue? It seems like you could in many cases just send right to send grid and it's reasonably fast. That would get rid of the need for beanstalkd and go.

I can see why you'd do it if you want your app to have a certain level of responsiveness, but otherwise this seems a bit like overkill.

One other option would be create an email api service in Go(or node or whatever) that that just returns a 200 instantly and sends the email after that. It would be as fast as dropping a msg into the beanstalkd queue with fewer moving parts.

comment 12y ago · link · parent

I hate to be self-promotional, but if you are interested in Uncle Bob's Clean Architecture, I would love it if you took a look at Obvious Architecture (http://obvious.retromocha.com). It's a working implementation of his ideas in Ruby, but the same structure can easily be done in any OO language. Actually, the implementation would be a lot easier in a language like Go or Scala that has things like type checked interfaces built in.

comment 12y ago · link · parent

Replace HFT with money and you're on the right track. The bad behavior in terms of investing will always exist because of greed. Greed will always exist as long as humans exist.

comment 12y ago · link · parent

One area where open salaries are not such a big deal - education. Many teachers are paid on an open scale of years of service X education level. It does create a culture of possibly too much higher education beyond what is useful or necessary for certain levels of teaching. That also creates teachers who don't want to switch jobs because they'll lose the years of experience pay.

Lesson - all people game the system for their own benefit.

comment 12y ago · link · parent

There was a really good talk from Charles Nutter about making JRuby fast and the mutable things that Ruby does that basically break caching and things that you do to make things faster at runtime.

I'm not surprised that persistent data structures can make things fast, in fact I've spent the last week speeding up a Rails app in some ugly spots by preloading the data structures to keep DB queries from happening, effectively turning a lot of just in time queries at the ORM level into a pre-loaded data graph. The speed is fantastic, but what is interesting is you could add a level of immutability to this and would be potentially even faster, especially on top of the JVM.

I've been playing with the idea of immutable entities in Obvious Architecture for a while and it really changes the way you look at your business logic and performance.

comment 12y ago · link · parent

Interesting. I found that TameJS or Iced CoffeeScript mostly solved the async terribleness problem in node, but you basically are using a non-standard toolchain at that point, and setting that up for a whole team is sort of absurd.

Also, I'm not fully convinced that node is worth the code complexity that all of these solutions bring with them when go or scala can give you better performance with much cleaner code.

comment 12y ago · link · parent

Tablets are getting cheap enough that branded tablets are going to be more of a common thing, especially for like trade show gifts and things. Remember how people used to distribute (or still do) software/presentations/sales materials via USB sticks or CD's? At some point it will be cost effective to give away a tablet with your stuff preloaded on there and with your company branding on it.

I can see this happening with custom enterprise type apps that have a tablet component. Take a sub-$100 tablet, get your brand on it and have it load into your app by default or something. Sort of like kiosk tablets.

comment 12y ago · link · parent

I don't know the exact quote but Warren Buffet has explained before that there are a lot of great investments you can make if you have thousands or millions of dollars to invest, but once you start getting into the billions, it's a lot harder to get that same return.

In my own experience, almost anyone can make hundreds of dollars, It's not super difficult to make thousands, but as a single person, scaling into the 6 or 7 figures usually requires working/partnering/networking with other people. A lemonade stand or a bake sale or yard sale is natually limited by location for example.

Another relevant example is Bingo Card Creator. You could argue that Patrick has just about maxed out what is possible to make selling bingo card software on the internet. It is no surprise that his second product Appointment Reminder has a much higher ceiling and I'm guessing that it makes a lot more than BCC does by now.

No matter how much effort Patrick put into BCC, getting past 100k a year would be a festivus miracle. Appointment Reminder could very reasonably hit 7 figures, but 8 figures would probably require a full on sales force, support staff, etc. and even then it would be a real push.

1
242526
54