Derek Gathright | Scribbles & Bits

CAT | Blogging

Feb/10

21

Crockford on JavaScript: Part 1

I just finished watching Part 1 of Douglas Crockford’s ongoing lecture series on JavaScript, and it’s fascinating stuff. A must watch for any programmer. Even if you don’t code in JS, it’s worth watching simply because this first part is all about the history of programming. (video of talk is below)

As web developers, we spend anywhere from a little bit of our time to the majority of it coding in JavaScript, but few know the history behind the language. I’m not talking about just reading the Wikipedia article and knowing that it was created by Brenden Eich at Netscape in ‘95, I’m talking about the history of where the ideas behind the language came from and everything that influenced it. Like most every language, JavaScript’s syntax and style didn’t appear out of nowhere, it was influenced by a number of different languages, and those influencers were in turn also influenced by a slew of languages.

It’s easy for those of us that started programming with C (or anything after) to just look at it as the “Alpha” language and ignore everything that happened before it, but that’s missing a lot of really important history, that we, as professionals, should know. It’s like a politician in the United States just ignoring everything that happened before 1776. Learn from the mistakes of the past and spot the trends going forward and pave the best path. Crockford shows us snippets of languages that were created in the 60’s and 70′, dissects them, and explains why certain people thought they were good ideas at the time. It’s amazing to think that there was a time before modules or functions, or before we had figured out the best way to format a for loop. The history of programming languages is littered with a ton of bad ideas, but occasional brilliant ideas. Those brilliant ideas are what get refined, and lay the foundation in the next generation of languages.

Finally, one concept he goes back to over and over that I found really interesting is that programmers are a very stubborn breed. We all know this. There’s little point to all our flame wars on which language or framework is better, and most of it comes from either insecurity or ignorance. He says it takes a long time for us to evolve, and he’s right. It’s not because new ideas aren’t coming along all the time, but it’s because the adoption of new ideas only take place at each generation shift, when the “old” thinkers get replaced those with few preconceived notions. The world didn’t wake up one day and realize that GOTO statements were bad, it’s that those who supported GOTO and argued for it for a decade finally retired. Out with the old, in with the new. That’s evolution.

Anyways, I could go on and on about all the “Ah hah!” moments in this talk, but you really need to watch it for yourself. I’ll probably chime in again after part 2, which I’m probably going to watch right now. I’m excited. It’s like a sequel. “Ooo! What happens now?!”

Also, here’s the “Mother of all Demos” video he mentions about halfway through.

, ,

This is a test from Textmate’s Blogging bundle. This is really cool.

,

Part of the reason for my recent increase in blogging is mostly due to my discovery of Windows Live Writer, I absolutely love it.  The only complaint I’ve had so far is that it doesn’t support tagging for Wordpress 2.3, something recently introduced with the release of Wordpress 2.3.  I assumed I’d have to wait for an update from Microsoft to be able to use WP 2.3 tagging, but it turns out that isn’t the case.  Check out this post from Ruhani Rabin who provides a great tutorial on how to enable tags support in WLW for WordPress:

In a nutshell all you have to do is download the wlwmanifest.xml file and upload it to wp-includes.  This file is what tells WLW a bit more about the blog and it’s capabilities.  Once that is uploaded, update the blog in WLW (Weblog > Manage Weblog) and viola, the “keywords” box shows up in the advanced options menu below your post in WLW.

No tags

Oct/07

20

New Wordpress Theme

3639 medium New Wordpress ThemeI figured it was about time to upgrade to a new theme, so I found this one, Snoods theme.  Whaddya think?

Because this theme doesn’t accommodate the native tagging capability of Wordpress 2.3, I had to hack into the wp functions to add the capability to display tagging in the post.  What Wordpress really just needs to do is append the tag info to the end of all posts, like I’ve done for this theme. 

If you need to do the same, update “the_content()” function in wp-includes/post-template.php to the following code (additions in yellow):

function the_content($more_link_text = ‘(more…)’, $stripteaser = 0, $more_file = ”) {
    $content = get_the_content($more_link_text, $stripteaser, $more_file);
    $content = apply_filters(‘the_content’, $content);
    $content = str_replace(‘]]>’, ‘]]>’, $content);
    ob_start();
        the_tags(‘Tags: ‘, ‘, ‘, ‘<br />’);
    $tag_html .= ob_get_clean();
    if (!empty($tag_html))
    {
        $content .=”<br /><div align=’center’ style=’clear:both;’><span style=’border:solid #333333 1px; padding:3px;’>”;
        $content .= $tag_html;
        $content .= “</span></div>”;;
    }
    echo $content;
}

This really the first time I’ve dove into the innards of Wordpress, and wow is it rather horrid.  Considering how important Wordpress is to the evolution of the blogging community, developers are important, and with the way the code looks now, I can’t imagine anyone would take up Wordpress development as a hobby.

No tags

You get 7000+ comments about viagra and porn to go through an delete. Ugh. Hopefully I won’t have to go through that again with the new spam filter. Thanks Akismet!

No tags

microsoft writerscreenshot

One of the reasons why I don’t find myself blogging too much is I think I’m just too lazy sometimes to go to my site, log in, go to the post page, use a crappy WSYWIG to create the blog entry, and hit post. Not a lengthy process, but one I get annoyed with. But I just came across Windows Live Writer, which is a Microsoft desktop app that hooks into your Spaces, Wordpress, Blogger, Livejournal, etc… blog and allows you to create a post in a very rich and intuitive interface. The biggest surprise is that it actually downloads the CSS sheet and mimics what your post will look like while you are editing it!

writer screenshot derek thumb First post from Windows Live Writer

So, props to Microsoft for coming out with a pretty slick app, and especially allowing users to connect it to something other than their Spaces blog, which no one has.

Alright, gotta post this to see what it looks like.

No tags

Apr/06

8

I won Prom King!

Thanks to Lisa, prom queen Sarah, and her date Derek for making the 2nd chance prom night an awesome night.  And thanks to everyone out there for your support over the last few weeks.  Its been a ton of fun.

Well the fun isn’t over yet, Sarah and my prize for being King & Queen?  We each get a 7-day trip for two later on this month to the all inclusive (yes, that includes drinks) Riu Caribe resort..

Works has to hate me though, hah.  17 days off in a matter of 30 days so I can go to Europe and Cancun.  Feel pretty guilty about that.

Here’s a few pics of where we’ll be staying.
CUNGRAI07 I won Prom King!
riu caribe I won Prom King!
grancHotelCaribe I won Prom King!

No tags

I sent an email at to the buzz last week saying they should select me for one of the male contestants for the prom court, and got a call yesterday telling me I’m in!  I guess they are going to call me Monday (the  27th) during the morning show (9:10 AM) to do some sort of an interview or something, the lady didn’t really know what exactly was going on.

From what I gather about the “prom court”, they take a handful of guys and some girls too, put them in a bracket where they face off against one another.  The winners are announced prom king & queen.

No tags

Apr/05

9

Kicking off yet another blog

The clock just jumped from 1:59 to 3:00 AM (daylight savings), so I’m thinking I’ll be up a bit later than I intended. Oh well…

Going on a 5th incarnation of my personal blog, I think I might actually stick with this one as opposed to the others that I have tried. I tried PHP-Nuke & Post-Nuke, but I didn’t have use for 99% of their capabilities. Plus, I don’t need a whole CMS for a simple blog. As a PHP-developer, I tried writing my own, but took too much effort for something I didn’t even know if I’d end up using. Then I went against my programmer roots and went with *gasp*… a 3rd party hosted blog. But as I assumed, the lack of control killed it for me. Being a PHP Developer, running a windows server, and two linux servers, going with someone else hosting my blog just wasn’t going to fly. So here I am, having just discovered WordPress, I am fairly happy with it so far. Installation was a breeze and the interface is great. It’s easy to understand why this is one of the more popular blog platforms out there.

Anyways, enough about… nothing (I tend to do that sometimes), what led me to Wordpress was this blog, which I came across doing research on SAJAX and JPSpan . Why SAJAX and JPSpan? Ever since I came across gmail and google maps, the idea of using a single web page as an application intrigued me. You can only make so many html forms and php processes before you become a bit disgusted with the clunky nature of the post-process-respond model that can inter-mingle multiple languages and display/action code all jumbled in one page. It creates complex and often convoluted code for rather simple tasks. Sure part of it might be my programming style, but the inherent nature of the whole system is also a big problem. There must be a better way to do all this, and more importantly, people are getting sick of the surfing the internet in the same way they did 10 years ago, the only thing that has drastically changed is the content out there. But we are still stuck in the
Client: Send server a request;
Server: Reply to client;
Server: Sever connection;

Client: Re-establish connection with Server, send another request;
Server: Reply to client;
Server: Sever connection;

Repeat…

It is a dated process that will hopefully be replaced by something a more intuitive in the future. Well we are starting to reach that time with new concepts and approaches to web design that include these and other methodologies and platforms. For example, check out this awesome XUL-Amazon app. (Yes, you need Mozilla/Firefox as IE doesn’t have XUL support). Also, check out what it looks like on OSX, a real application! I think Microsoft has a lot of things up its sleeve as well for Longhorn in trying to make the web page and the overall web interactive experience much smoother than it is now.

Where’s Java and Flash in all this? Isn’t this whole client-server interaction on a universal platform what it is all about? Yeah, but if it was really the solution, would I even be discussing this right now?

So go check that stuff out and get your thinking cap on as figure out the best way to use these new tools like everyone else is doing right now. There isn’t one clear vision at this point as each has their downsides…. IE probably won’t support XUL for a long time, if ever. You find people who have fallen in love with AJAX and others who think it’s just the latest “Google does it so, it must be cool!” idea. Then you have JPSpan and SAJAX which approach the idea very differently. Microsoft’s Avalon mixed with the rest of the .NET framework will solve this problem, but only on Longhorn PCs, and who knows if the industry will adopt such a proprietary and limited framework.

, ,

Find it!

Theme Design by devolux.org