Author Archives: Sassberto

About Sassberto

The name's Poochie D And I rock the telly I'm half Joe Camel and a third Fonzarelli I'm the kung-fu hippy From gangsta city I'm a rappin' surfer You the fool I pity Kids remember to recycle ... TO THE EXTREME!!!

Over Under Sideways Down

Over it:
* Yeah Yeah Yeahs – Fever to Tell
* Matrix Revolutions
* Jay-Z – The Black Album
* Nico – These Days

Into it:
* New York Dolls – New York Dolls
* Coldplay – A Rush of Blood to the Head
* L’il Flip – Game Over
* Panic Room

Joel on Houseware

I am in danger of becoming a Joel Spolsky fanboy. This article is amazing.

“And here’s the clincher: I noticed (and confirmed this with a recruiter friend) that Windows API programmers here in New York City who know C++ and COM programming earn about $130,000 a year, while typical Web programmers using managed code languages (Java, PHP, Perl, even ASP.NET) earn about $80,000 a year. That’s a huge difference, and when I talked to some friends from Microsoft Consulting Services about this they admitted that Microsoft had lost a whole generation of developers. The reason it takes $130,000 to hire someone with COM experience is because nobody bothered learning COM programming in the last eight years or so, so you have to find somebody really senior, usually they’re already in management, and convince them to take a job as a grunt programmer, dealing with (God help me) marshalling and monikers and apartment threading and aggregates and tearoffs and a million other things that, basically, only Don Box ever understood, and even Don Box can’t bear to look at them any more.”

How Microsoft Lost the API War

Breakdown

I finally learned how to use a visual debugger – lemme just say: “WHY THE HELL HAVEN’T I BEEN USING THIS ALL ALONG?”

I was a print-statement guy for a long time, but I can say with no hesitation: a visual debugger that can step-through code is an essential tool.

It’s All About The Pentiums

It’s all about the Pentiums, baby
Uhh, uh-huh, yeah
Uhh, uh-huh, yeah
It’s all about the Pentiums, baby
It’s all about the Pentiums, baby
It’s all about the Pentiums! (It’s all about the Pentiums, baby)
It’s all about the Pentiums! (It’s all about the Pentiums, baby)
Yeah

What y’all wanna do?
Wanna be hackers? Code crackers? Slackers
Wastin’ time with all the chatroom yakkers?
9 to 5, chillin’ at Hewlett Packard?
Workin’ at a desk with a dumb little placard?
Yeah, payin’ the bills with my mad programming skills
Defraggin’ my hard drive for thrills
I got me a hundred gigabytes of RAM
I never feed trolls and I don’t read spam
Installed a T1 line in my house
Always at my PC, double-clickin’ on my mizouse
Upgrade my system at least twice a day
I’m strictly plug-and-play, I ain’t afraid of Y2K
I’m down with Bill Gates, I call him “Money” for short
I phone him up at home and I make him do my tech support
It’s all about the Pentiums, what?
You’ve gotta be the dumbest newbie I’ve ever seen
You’ve got white-out all over your screen
You think your Commodore 64 is really neato
What kinda chip you got in there, a Dorito?
You’re usin’ a 286? Don’t make me laugh
Your Windows boots up in what, a day and a half?
You could back up your whole hard drive on a floppy diskette
You’re the biggest joke on the Internet
Your database is a disaster
You’re waxin’ your modem, tryin’ to make it go faster
Hey fella, I bet you’re still livin’ in your parents’ cellar
Downloadin’ pictures of Sarah Michelle Gellar
And postin’ “Me too!” like some brain-dead AOL-er
I should do the world a favor and cap you like Old Yeller
You’re just about as useless as jpegs to Hellen Keller

It’s all about the Pentiums! (It’s all about the Pentiums, baby)
It’s all about the Pentiums! (It’s all about the Pentiums, baby)
It’s all about the Pentiums! (It’s all about the Pentiums, baby)
It’s all about the Pentiums! (It’s all about the Pentiums, baby)

Now, what y’all wanna do?
Wanna be hackers? Code crackers? Slackers
Wastin’ time with all the chatroom yakkers?
9 to 5, chillin’ at Hewlett Packard?

Uh, uh, loggin’ in now
Wanna run wit my crew, hah?
Rule cyberspace and crunch numbers like I do?
They call me the king of the spreadsheets
Got ’em printed out on my bedsheets
My new computer’s got the clocks, it rocks
But it was obsolete before I opened the box
You say you’ve had your desktop for over a week?
Throw that junk away, man, it’s an antique
Your laptop is a month old? Well that’s great
If you could use a nice, heavy paperweight
My digital media is write-protected
Every file inspected, no viruses detected
I beta tested every operation system
Gave props to some, and others? I dissed ’em
While your computer’s crashin’, mine’s multitaskin’
It does all my work without me even askin’
Got a flat-screen monitor forty inches wide wide
I believe that your says “Etch-A-Sketch” on the side
In a 32-bit world, you’re a 2-bit user
You’ve got your own newsgroup, “alt.total-loser”
Your motherboard melts when you try to send a fax
Where’d you get your CPU, in a box of Cracker Jacks?
Play me online? Well, you know that I’ll beat you
If I ever meet you I’ll control-alt-delete you
What? What? What? What? What?

It’s all about the Pentiums! (It’s all about the Pentiums, baby)
It’s all about the Pentiums! (It’s all about the Pentiums, baby)
It’s all about the Pentiums! (It’s all about the Pentiums, baby)
It’s all about the Pentiums! (It’s all about the Pentiums, baby)
Now, what y’all wanna do?
Wanna be hackers? Code crackers? Slackers
Wastin’ time with all the chatroom yakkers?
9 to 5, chillin’ at Hewlett Packard?
What??

Sassy B’s ASP.NET Jambaroo

About 3 months ago I made the decision to dump “classic” ASP / VB COM in favor of Microsoft’s spankin’ new ASP.NET.

In a short while I have picked up VB.NET and C#, and become quite familiar with most of the common framework components. While there is a lot to cover, I’ll give you my overall impressions of the framework and the toolkit.

Firstly, it’s important to note that ASP.NET is a quantum leap over ASP/COM. While ASP/VBscript was/is effectively a crippled programming language for novices, .NET gives an experienced dev a lot of nice tools.

The jury is still out on whether ASP.NET really offers much over JavaBeans and JSP or PHP. Obviously these are not easy comparisons, as each has it’s own strenghts and weaknesses. I will say, without a doubt, that ASP.NET offers very little that is not already available in other web app platforms. What it does offer, however, is a bit more polish, and a bit more completeness, and a bit more ease-of-use, especially for novice web devs.

ASP.NET’s maligned and misunderstood event model is actually a nice feature, especially once you begin re-using user controls. Simply put, you can encapsulate the logic of a form in a user control, nest those controls in a page, and the aggregated events will all fire based on the parent’s events. This is very slick, and allows for some quite profound code re-use.

ASP.NET is also an interesting beast, offering a simple XML template system on top of ‘codebehind’ script. While this does a good job of separating presentation from logic, it is somewhat primitive and simple when compared to SMARTY (PHP) or Velocity / Freemarker (Java). The simplicity and ease-of-use with ASP.NET limits it’s ability to do things like dynamically load templates and nest templates. While this is possible by overriding some .NET base classes, it’s expected that ASP.NET 2.0 will have some sort of robust templating, called ‘Master Pages’.

VB.NET is an update of VB 6 and is now a completely OOP language. A lot of the nasty idiosyncracies of VB have been cleaned up. Problem is, there is really no longer a compelling reason to use VB for anything – because you have C#. Many of us seem to agree that VB.NET is the endgame plan for Microsoft to drop VB 6 support. I would guess that 90% of VB programmers will never make that leap, and will spend their careers trapped in the VB 6 ghetto Microsoft has created.

C# is a great little language. With stonger typing and faster execution than VB, it’s C/Java style syntax is a lot cleaner and less verbose. I have moved all my new projects to C# and thus far have had excellent results. If you can write Java or C/C++, and you know OOP, you will have no problem learning C#.

Finally, the .NET class libraries. The .NET lib is huge and has basically everything. The ASP.NET classes contain a vast amount of utility controls, and functionality like HTTP servers, I/O filters, logdaemons, and other such niceties for a server dev.

Now, on to the knocks. Hey, it wouldn’t be a Microsoft product without some serious flaws, right?

First up is Visual Studio.NET 2003. For 900 bucks I expect the HTML editor to work. Unfortunately, it sucks. They used the Frontpage HTML gen libraries! Remove the WYSIWYG form tools, and the big giant productivity gains go right out the window.

Next up, many of the supplied ASP.NET controls, especially the Datagrid, suck. There are numerous gaps in their functionality which essentially defeat their usefulness. Example – you cannot set a querystring with multiple parameters without resorting to mingling program code in template.

Finally, despite all the talk about ‘Managed Code’, many, many of the .NET classes are just wrappers around existing, sucky COM objects. Imagine my joy when I discovered that System.Web.Mail was really just good ol’ POS CDONTS in disguise.

In conclusion:
ASP.NET is an excellent package, and goes a long way towards redeeming Microsoft as a developer tools company. Yes, there are flaws, but the overwhelming sophistication of this toolkit is quite impressive. While it does compare favorably with other tools, it suffers from some key flaws, and a lack of platform portability. As always, your mileage may vary.

If you are a pro web dev, I would advise getting some familiarity with this toolkit – it’s going to be around for a while.

HAHAHAHA

A Japanese company and an American company decided to have a canoe race on the Missouri River. Both teams practiced long and hard to reach their peak performance before the race.

On the big day the Japanese won by a mile. Afterward, the American Team became very discouraged and morally depressed. The American management decided the reason for the crushing defeat had to be found.

A Management Team made up of senior management was formed to investigate and recommend appropriate action. Their conclusion was the Japanese had 8 people rowing and 1 person steering, while the American team had 8 people steering and one person rowing. So American management hired a consulting company and paid them an incredible amount of money. They advised that too many people were steering the boat, while not enough people were rowing.

To prevent losing to the Japanese again next year, the rowing team’s management structure was totally reorganized to 4 steering supervisors, 3 area steering superintendents and 1 assistant superintendent steering manager. They also implemented a new performance system that would give the 1 person rowing the boat greater incentive to work harder.

It was called the Rowing Team Quality First Program, with meetings, dinners and free pens for the rower. Even new paddles and medical benefit incentives were promised for a winner. We must give the rower the empowerment and enrichments through this quality program. The next year the Japanese won by two miles.

Humiliated, the American management laid off the rower for poor performance, halted development of a new canoe, sold the paddles, and canceled all capital investments for new equipment.

The money saved was distributed to the senior executives as bonuses.

home

NY this weekend, be back monday.

Tibs is already there. Creeper and Moist, a rager is deserved, and necessary.

C has no string type


#include <stdio.h>
#include <string.h>
#include <stdlib.h>

const char *s1 = "ZBCDEF";
const char *s2 = "ABCDEFG";

/* strlen using compact pointer notation
*/
size_t MyStrlen(const char *s1)
{
    const char *ptr = 0;                        
    
    while(*s1)                                    
    {
        *s1++;                                    
        ++ptr;                                    
    }        
                
    return( (size_t)ptr );                     
}

/* String comparison using compact pointer notation
*/
int MyStrcmp(const char *s1, const char *s2)
{    
    while(*s1)                                     
    {
        if (*s1 == *s2)                         
        {
            *s2++;        
            *s1++;
                                                
            if (*s2 == 0 && *s1 == 0)         
                return(0);
            else if (*s2 == 0 && !*s1 == 0)     
                return(1);    
            else if (!*s2 == 0 && *s1 == 0)     
                return(-1);            
        }
        else if(*s1 > *s2)                        
        {
            return(1);
        }
        else if(*s2 > *s1)                        
        {
            return(-1);
        }        
    }
return(0);
}

char *GetSubString(const char source[], int start, int count, char result[])
{
    
    if ((unsigned int)start > strlen(source))         
    {                             
        *result = 0;                                
    }
    else
    {    
    
        if ( (unsigned int)start + count > strlen(source)) count = strlen(source) - start;

        while(start > 0)                        
        {
            source++;
            start--;                                
        }

        *(result + count) = 0;                        
    
        while ( count > 0 || *(source + count) != 0 )         
        {
             count--;             
            *(result + count) = *(source + count);    
        }
    }
    return(result);
}

#define RESULT_MAX 19

int main(void)
{
    char result[19];
    const char source[] = "JIBSON GLOMGOLDS";
        
    printf("nMyStrlen: %inn",(int)MyStrlen(s1));
    printf("MyStrcmp: %inn", MyStrcmp(s1,s2));    
    printf("GetSubString %snn", GetSubString(source,1,5,result));

    return(0);
}


Fun with pointers, see if you can figure it out. By the time I finished this, I finally understood pointers.

C is a great language, try it today.