Sunday, April 22, 2007

programming anyone ?

You know what's funny about Beryl/Vista ? They're doing the same stuff the Mac was doing years ago on puny hardware. I mean really, how frickin' hard is it to draw a window as a texture on a pair of triangles ? Seriously!

Programmers are sloppy, because sloppy is all the industry wants to pay for. Way back in the day when CPU cycles were super expensive, programmers were paid better money and given the time to tweak the crap out of everything, because if they didn't, the app would run dog slow and people wouldn't buy it. The problem is that somehow, people now tolerate underperforming software. They see it as a reason to upgrade... good god, they actually fall for it! Gee I certainly remember surfing the web on a 486 with 8mb of Ram back in the day. Now my OS needs a good 50-60mb to itself, and that's after I ripped out all the cruft. Normally it would be 100mb just for sitting idle with a background image and a neon-colored task bar. Gee uh, where'd all my system resources go ? Does it really require 7.3 million bytes to house a TCP/IP stack when some embedded devices pull it off with oh, 6kb or so ?

The truth however, is that if we were to write code as tightly and meticulously as we did in the 80's and 90's, software would perform, on average, at least 5 to 10 times faster than today, excluding hard bottlenecks like disk access and network bandwidth. It would also take 50 times longer to write the software, and I'd say less than 1% of people who call themselves "programmers" are even able to write such finely tuned code. Everyone doing VB ? Out. Everyone doing RAD ? Out. All you Ruby on Rails weenies ? follow me to this dark alley *BLAM*

I remember spending hours on little loops, with a CPU reference manual and a calculator. Sometimes I did little time sketches to figure out the best way to stagger memory accesses so as to not starve the execution pipes. Often times that meant weaving two disparate functions together, one being memory-hungry, the other CPU hungry. Together they filled each other's latency pockets, and my routine ran nearly thrice faster as a result. No C compiler I've ever seen could do such kinky things. Heck one time I even wrote a little assembler demo whose code executed twice: forward, then backward. The opcodes and data were carefully selected to represent valid instructions when reversed. It was more than a nerdy trick, it allowed my routine to fit entirely in the CPU's on-die cache, which gave it a huge speed boost but more importantly, it enabled a lowly 486 to mix 48 sound channels in real-time. Today's Cubase can't even handle a couple dozen channels without stuttering and/or crashing, on computers over 100 times faster than a 486.

Wednesday, March 14, 2007

obesity

Anyone who has studied basic human metabolism should be able to figure this out. Exercise alone simply is a bad way to lose weight.

The total energy expenditure (TEE) of the human body is determined by the following equation:

TEE = BMR + PA + TEF

BMR = Basal metabolic rate
This is proportional to the lean body mass, not the BMI (which is a really bad measure of obesity). This is typically 60 - 70% of your TEE

PA = Energy expended during physical activity
This consists of around 20% of your energy expenditure

TEF = Thermic effect of food
This is the energy expended to digest food, typically 10% of kcal's consumed. This really doesn't really come into play in weight gain since eating more food still gives you excess calories (albeit at 90%) and eating less is still fewer calories.

In other words, the majority of your energy expenditure is determined by your basal metabolic rate by a ratio of around 3.5 to 1. This is especially true in children whose BMR's are naturally higher than most adults'. This is not to say that exercise isn't useful. BMR is determined by lean body mass, which is determined by your muscle mass, which is determined by genetics and exercise. Exercise does help you lose weight, but it takes a lot longer than diet. Exercise also has independent benefits on cardiovascular health and a host of other health measures.

So all those people who tell you that losing weight is 80% diet and 20% exercise aren't lying. That's simply the science.

Monday, February 19, 2007

Open Source's Value

Linux can be, and is, an OS for users. It isn't an OS for third party closed source binary distribution. Don't read that as non-commercial; commercial software was distributed in source form before Microsoft and will be again. Distribution in binary form makes sense for games and art, but not for general purpose computing. The value of doing things in software rather than in hardware is that software is malleable. But you need the source to realize the full value; binary distribution removes value.

Thursday, January 18, 2007

thinkers vs tradesmen

Employers?

Leave them alone for a moment, think of the people themselves.

Most do not want to think for themselves and would rather do something mundane that pays the bills.

The percentage of people that actually want to think for their living is quite dismal in the grand scheme of things.

Secondly, look at who is more respected/has more resources in the society -- a "pop" star or a mathematician?

While the mathematician may be content with what s/he may have, society for the most part does not care about its "thinkers".

If we did, there would be far more folks out there doing things like pure mathematics, theoretical physics and other abstract areas that genuinely require thinking (not to discount the thinking in engineering and applied sciences, but pure sciences generally require more of a deidication than applied sciences and engineering).

So while engineering schools may be geared towards thinking, the question boils down to how many jobs out there require you to think as opposed to obey? How many people out there like people that think rather than do as they are told (while doing as you are told is certainly an important part of your learning experience, how many folks here have felt that they could find a better solution than the ones they have been asked to implement?).

No, if you want thinkers you need a society that encourages thinking.

Wednesday, January 17, 2007

promotion or not ?

Liquid is right. Maybe some of us are less concerned about "advancing" than having time with our families and a high quality of life.

I can't exactly put my finger on the day and time I decided I didn't need to "move up" any more, but let me tell you, it was a liberating moment.

The funniest part of it is that immediately after the first time I turned down a "promotion" because I felt satisfied with my life as it was, coincided directly with the really good opportunities showing up. It almost seems like happiness and satisfaction are qualities that draw success. Instead of running after success, if you reach a point where you're not quite so hungry, so desperate, success starts coming after you, instead.

I've seen what ambitious, driven people look like. Take someone like Dick Cheney for example. Here's a guy who clawed his way to the top, literally. He's worked his way to a level of wealth and power most people only dream of, and his face is like a road-map of pain and desperation. I wouldn't want to be inside his head on the day he shuffles off this earth.

Thursday, January 11, 2007

freeeeeeeedom!!!

If you are young, healthy, single, and debt-free, you dont need to be a millionaire to pursue your dream. Ramen noodles, a backpack, and a good attitude is all you need. I don't understand why people think they need to "pay their dues" before doing what they really want to do in life.

You live only once. You are young only once. So, you should do whatever it is you really want to do.

This, of course, is why it is so important to live frugaly and avoid debt -- it can rob you of your freedom. There's nothing worse than some student debt with a side dish of some credit cards, a long-term cell phone contract, and a car lease.


-------------

Sheesh. If they're poor, what am I? I make just under 28,000/yr (USD). My TV is a 25" and over about 6-8 years old. Oh, and my wife and I have 2 kids.

Money doesn't make you rich, perceived lack thereof makes you poor. I know many people with far more money than I that complain about money far more than I. If you can afford to put food on the table, a roof over your head and not live in fear for your life, health or well-being, it is hard to justify a claim of 'poor'.

No, I'm not the guy who sold his house and cars to live poor on purpose, we're just a young family starting out. A big problem, especially here in the States, seems to be that if you are not able to consume everything your heart desires that you are poor and living without. If that describes you, I strongly suggest you spend some time determining what really makes you happy and focus on that.

Sorry for the rant, but those of us that live a bit below the 'living wage' (here in Utah I'd have to make a few thousand more a year to be at it) are tired of hearing about how people that make a multiple of what we do are 'poor.'
:)