Archive for June, 2006
is_being_dugg() ?
June 27th, 2006 • General
Here’s a one-liner to help you figure out if you’re being dugg or not. You can use it in your WordPress to serve an altenative, less hefty version of a page. I hacked it in a couple of minutes, and Digg still don’t have an API so I couldn’t find another way. It’s very late, so please excuse me.
#!/usr/bin/php <?php function is_being_dugg() { } ?>
LAMP’s Standing Still
June 25th, 2006 • 14 comments General, PHP
These guys seem really serious about losing LAMP. I don’t think we’ll lose LAMP as a platform, but it’s probably stagnating. That is, not lost but not going anywhere.
Three or four years ago I used to get excited about PHP releases, I remember how big was the jump from 4.0.6 (read buggy) to 4.1 (read cool). We all know it was the 4.x tree that caused everybody to hail. We compared it to 3.x, we liked it a lot. Not because 4 became object-oriented, not because 4 introduced tons of features, but because 4 made it much easier to do what we do best: make stuff.
I would argue that PHP’s next major tree was the 4.3, but then things stated getting out of hand. Everybody started getting touchy feely about the “enterprise”, we wanted to prove that PHP can make, that Java’s no better. Remember the PHP vs. Java, PHP vs. ASP.NET, PHP vs. Fluffy Puppies debates? Benchmarks? Micro-scrutinizing? strstr vs. str_str? I do, and I couldn’t bare it. I couldn’t care less whether PHP was enterprisey or not, I just wanted to make stuff, I wanted a sharp tool, a single tool, not a swiss-army knife, and I’m sure many PHP developers would agree.
PHP5 couldn’t make up for it. Admit it. Deal with it.
PHP5 introduced all sorts of bells and whistles, a whole new OO model, SimpleXML, SQLite and whatnot. How many of us felt these are crucial? These features where important, cool, but not crucial, they weren’t enough of a reason for ISPs to upgrade, they weren’t good enough for the “ignorant” 90% user base. Web applications are simple, and that’s what the language, platform and tools are supposed to be. Take a look at Rail’s success then tell me otherwise.
I’m sorry if I sound too harsh, but it is only because I really like PHP and I don’t want it to lose focus. I loved reading this guy and this guy, I used to keep up with [this site]http://www.dotgeek.org and this site, I used to like this board and this thing. I used to do have no doubts about PHP, I don’t want to be disappointed now.
The PHP community is shrinking by the day, at least that’s how I feel. I consider the community to consist of the extremely enthusiastic evangelists, those who make stuff instead of benchmarking them. We have a growing base of young developers who only need a small portion of PHP’s capabilities and a shrinking base of developers who want to make things happen. We need chaos, not community rules. We need a CPAN, not a PEAR, a Smarty or a Zend Framework; these projects give me a feeling of being the “chosen” ones.
However, along with chaos we need an educated community, one that can automatically filter crap. Let a thousand frameworks flourish because with a filtering community only the best of the best will survive, and not because Zend or PHP.net chose that.
Winning company’s acceptance is not an advantage per se. That’s starting at the top of the pyramid, which the opposite of how Perl and Ruby grew. Hackers used to like Perl, I personally love Perl, I use it everyday for tons of mini tasks, and I think that’s how Perl got into big corporates; Larry had nothing much to do with it.
PHP has limited itself to web applications, and that was good. But later on, PHP started to market itself as both an enterprise and a scripting (as in CLI) language. Of course there’s no way it can fit both, because “scripting” and “enterprise” can’t be crammed into the same sentence without horrible consequences. This marketing expansion didn’t come naturally, it felt like it was forced upon PHP and that we’re shoving PHP somewhere it doesn’t belong, and that it was now obliged to compete with two well-backed platforms.
Few have noticed that PHP wasn’t a platform by itself, and that it can’t compete with Java or .NET because it wasn’t complete without LAM. We should be pushing PHP away from that stiff competition and try to convert it to a leader in its own category. I think Marco’s pointing in the right direction with his suggestion to make PHP a foundation. It’ll hand over the steering wheel back to where it belongs.
Two Tiny Things
June 24th, 2006 • 1 comment Asides
One:
Please don’t use Lightbox or any other colored box unless absolutely necessary. It looks really cool, but it steals away my right to middle-click. I’m telling you, I have tabs and I am not afraid to use them.
Two:
These guys are saying that it’ll take you around seven lifetimes to scroll to the bottom of their page. If anybody finishes this, please let me know, I’d like to know how excessive self-satisfaction feels like.
BumpTop, a Physics-based Desktop
June 23rd, 2006 • Asides
This baby is absolutely stunning and is probalby how Scoble should have evangelized tablets. Hey, at least it looks better than Microsoft Bob.
Onward, Rover!
How I lost 40 Kg – Tips for Losing Weight
June 10th, 2006 • 89 comments General
This is a really embarrassing post, but whatever.
I found Colin’s diet contest thingy sometime when I was reading about Rails, 9rules and 37signals, I’m not sure what led me there but I thought this should make a refreshing post to my blog.
To keep it short, I used to weight 125 kg when I was friggin’ 16! That’s a whole 275 pounds. It was completely absurd. I’m 187 cm tall, that’s 6′ 1.6″, so 125 kg wasn’t right at all.
8 months later, I’m 87 kg, jumping like a monkey, happy like there’s no tomorrow.
So what did I do? Now, you have to understand that I’m neither a professional trainer nor am I a doctor, so you probably shouldn’t take this too seriously, especially not when its life-threatening or something. Here are a few tips and conclusions from my experience:
If you want to lose weight start now! Not next week, not tomorrow, but right now. Throw away that tasty candy, get rid of all greasy food, and go out jogging.
Special diets never work. Ever. If you lose your weight by following a diet, you’ll gain it back in just a few months. You need to eat, your body needs every type of food, from healthy vegetables to fat slobby hamburgers from time to time.
Eat properly. Get rid of your snacks and in-between-meals pleasures. Have three meals a day, make the last one bread and sugar-free.
Breakfast is the most essential meal, make sure you have it. It has to have everything, meat, milk, bread, vegetables and if you really feel like it you can have some sweets.
Don’t believe the myths of no-juice, no-fruit, non-fat diet cheatsheets. You can eat all you want, as long as it’s on breakfast. By the end of the day, your body simply burns and gets rid of the excess.
Try not to lose more than 1 kg per week. Excessive weight loss can be damaging, and you end up gaining more eventually.
Exercise, exercise, exercise. I can’t stress it enough. The basic idea is to burn a tiny bit more calories than what you consume. Once you start, get rid of the scales and start tracking your progress with a mirror. You wanna look good after all, don’t you?
Mass weight adds up to fat weight, remember that. When you start to exercise you lose lots of weight, but then you stop at a point where you can’t lose any more. That’s mass. If you’re exercising properly you’ll end up gaining more weight, but that’s good weight.
Heavy-lifting and body building shape a figure, but they don’t help you burn fat. 20-30 minutes of daily cardio (or sex) do. That’s how you can get those tight abs, burn fat.
Though I lost weight by doing body building, I used to do three out of four sets with light weights, the fourth set was extra heavy just to make me feel good (see point below).
Make sure you’re happy, even if it’s on the expense of your diet. If that means you just have to have that snickers in the morning, then by all means do it. If you start getting depressed, you’ll never lose weight, you’ll end up eating more.
Passion is a like a snowball, once you start working out you’ll start liking it, automatically eating less, and your body will choose the food for you so follow your cravings.
Don’t worry, you look fabulous.