1048576.com 2 to the 10th, squared!

16Apr/10Off

MySQL tip: UPDATE LIMIT 1

Here's one I picked this up a while ago, for those that rock mysql at the command line all day like I do:

master/wp> UPDATE user SET ad_id='fb' WHERE user_id = 1337 LIMIT 1;

It's a good way to ensure that if you seriously fcuk the query up, you only update 1 record. For multiple records, there's another good practice to get used to: do a SELECT first, using the same exact WHERE criteria you plan to use in your UPDATE statement. This verifies the set you will be affecting when you do run the UPDATE is indeed what you want to update, and you can plug the row count you get from it into your UPDATE's LIMIT clause.

26Mar/10Off

Best ChangeLog message EVER!

I was browsing available app updates in the Apple App Store for my iPhone 3G today, and I'm one of those that likes to read the changelog message before I install an update. The reasoning behind this is kinda funny: I mostly engage in this activity when in the bathroom, and I don't have WiFi only 3G available. Because 3G is slower, I tend to only install updates that do something more than generic bugfixes - I'm mostly interested in updates which include new features, improved navigation, etc.

Yelp is an iPhone app that's frequently updated, which is what you want to see from an app developer  -  timely updates that keep the app current and in sync with their web service.  As Yelp happens to be one of the apps I use almost daily when out and about, I checked to see what this latest update includes. I LOL'd when I saw this - good thing I was sitting down! :)

Yelp! 4.1.1 ChangeLog

"Superamazing bug fixes and, unfortunately, still no jet packs."

ROFLMAO! Unfortunately, this doesn't really relay what was fixed, but it was original enough to get me to update.  Happy to see that people to there still have a sense of humor!

16Feb/10Off

Intel Moblin & Nokia Maemo merge: MeeGo

Intel's kickass Moblin project, which rocks netbooks with its slick user interface, and Nokia's Maemo mobile device platform are being merged into a new project called MeeGo, which will run on both x86 and ARM microprocessor architectures.  The official announcement talks about the reasoning behind this, and it makes sense to join forces as I think this will be one of the areas that will see a lot of much-needed innovation in the near future.  With the advent of internet-enabled TVs just around the corner, the market MeeGo will go after is poised to blow up!  We're not talking just netbooks and TVs, but in-vehicle "infotainment" systems, tablets, "media phones" are new classes of mobile-like devices that will soon become as indispensable as mobile phones.

While I have not played with Maebo, I really liked Moblin 2.1's interface on a 10" netbook.  One can clearly see the GUI is optimized for the limited real estate offered by this class of devices.  While at this point MeeGo is vaporware (much like HipHop for PHP, still MIA as of today), the first project release is scheduled for Q2 2010. I hope MeeGo has native VM support so it runs without workarounds like those required by Moblin.  Can't wait to play with it!

3Feb/10Off

Facebook HipHop for PHP video

As previously reported, Facebook is getting ready to open source HipHop for PHP. Nothing at GitHub yet, but here's the video introducing the project at Facebook HQ in Palo Alto, CA:

Some of the tasty meat:

  • single-process multithreading model in their own HTTP server allows sharing of DB connections between threads
  • you can run directly in their own interpreter, HPHPi, for faster workflow
  • they made some PHP extensions thread-safe, code to be released with HipHop

As an audience member said, can't wait to start playing with it!

2Feb/10Off

Facebook releases HipHop for PHP tonight!

Haiping Zhao posts on developers.facebook.com that the long-awaited HipHop for PHP project will be released as open source tonight.  Here's a description of it in Mr. Zhao's own words:

One of the key values at Facebook is to move fast. For the past six years, we have been able to accomplish a lot thanks to rapid pace of development that PHP offers. As a programming language, PHP is simple. Simple to learn, simple to write, simple to read, and simple to debug. We are able to get new engineers ramped up at Facebook a lot faster with PHP than with other languages, which allows us to innovate faster.

Today I'm excited to share the project a small team of amazing people and I have been working on for the past two years; HipHop for PHP. With HipHop we've reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page. Less CPU means fewer servers, which means less overhead. This project has had a tremendous impact on Facebook. We feel the Web at large can benefit from HipHop, so we are releasing it as open source this evening in hope that it brings a new focus toward scaling large complex websites with PHP. While HipHop has shown us incredible results, it's certainly not complete and you should be comfortable with beta software before trying it out.

HipHop for PHP isn't technically a compiler itself. Rather it is a source code transformer. HipHop programmatically transforms your PHP source code into highly optimized C++ and then uses g++ to compile it. HipHop executes the source code in a semantically equivalent manner and sacrifices some rarely used features — such as eval() — in exchange for improved performance. HipHop includes a code transformer, a reimplementation of PHP's runtime system, and a rewrite of many common PHP Extensions to take advantage of these performance optimizations.

Some interesting facts: the project took nearly two years to come to fruition, and the idea for the project came at a Facebook Hackathon.  PHP creator Rasmus Lerdorf posted this on Twitter today: "HipHop on simpler template-style PHP pages probably isn't going to help you too much. It's not going to make your SQL queries any faster."

Check the original post around 7:30 PM Pacific tonight, Feb 2nd, for the official release.  Presumably, the project will be posted here, the place for all Facebook Open Source projects.

27Jan/10Off

The Driving Blog – I drive, therefore I am

Just launched a new site, The Driving Blog [thedrivingblog.com]!  God only knows how much I drive; I have always wanted to have a place to jot down what goes though my head when I'm "out there" - after all, it takes a lot of energy! Being someone who's keenly, sometimes painfully, aware of numbers, I do a lot of calculations and play all sorts of games like "guess the exact trip mileage the fuel light will go on" to keep from getting bored.  It works, and it will be great to finally be able to share these thoughts (and tips) with others.  So check it out!

22Jan/10Off

Google Analytics hours of day

Here's a quick way to use Google Analytics to view your site's traffic by hours of day. Among other things, this can be useful when planning scheduled maintenance on a high-traffic website -- by checking traffic by hour, you can identify when your site experiences its lightest loads and plan accordingly (and, conversely, avoid the time with the heaviest loads!).

It's actually pretty simple to have Analytics display your traffic by hour, over any period of time:

Google Analytics hours of day

  1. Select Visitor Tracking | Visits from the menu on left
  2. On the right, locate and click the clock icon

That's it! As hinted above, it will display the traffic for the currently selected date range, so if you want to see if just for the past week, or just for yesterday, just play with the date range. This can be especially useful when performing a post-mortem on some event that occurred during a particular day, or range of days. Enjoy!

31Dec/09Off

Help save MySQL!

Monty, the creator of MySQL, sent out an email today in which he asks people in the community to sign the petition to help save the open source MySQL database. Check out his latest blog post, Help keep the Internet free [monty-says.blogspot.com], for more insights on the Sun-Oracle deal.

Visit helpmysql.org for more information and sign the petition if you agree with Monty that "if Oracle buys MySQL as part of Sun, database customers will pay the bill."

Tagged as: , , 1 Comment
8Dec/09Off

Chrome for Linux is out!

This is one of those days when I can see the good in Google.  Sure it's a big corporation, but it's great to see there's still some honest goodness, to see they haven't forgotten their roots.  This is a day Google makes a lot of geeks happy by finally releasing Chrome for Linux!  Sure it's only a beta, but it's been long enough and it's finally out!  Here's the official mail I got from GOOG:

Hello everybody out there using Linux -

Google Chrome is go for beta on Linux! Thanks to the many Chromium and WebKit developers who helped make Google Chrome a lean, mean browsing machine. Here are a few fun facts from us on the Google Chrome for Linux team:

60,000 lines of Linux-specific code written
23 developer builds
2,713 Linux-specific bugs fixed
12 external committers and bug editors to the Google Chrome for Linux code base, 48 external code contributors

Thanks for waiting and we hope that you enjoy using Google Chrome!

Google Chrome Team

That's pretty cool stuff, and the link to the release, which in of itself is geek-hip, contains a xkcd-style comic which is thoroughly enjoyable!  So grab it while it's hot!

1Oct/09Off

Top Blog Posts page

I've added the Top Blog Posts page today, check it out and watch for updates!

Filed under: New stuff No Comments