Categories
From The Archives

Active Shitter Pages

As I probably mentioned, about 3 months ago I landed a kick ass job at a well established local web firm [names concealed to protect the innocent]. Before starting that job I had very minimal experience with ASP – in school, it left a bad taste in my mouth but i couldn’t remember any specifics. I wrote it off as one of those pathetic microsoft things. In spite of my aversion to and inexperience with ASP, I still managed to land a job with a company who – up until then – had relied heavily on ASP. I had no choice but to dive headfirst into uncharted waters. All tolled, in the past few month’s I’ve become about 50% as comfortable with ASP as I am with PHP – and I’m decided that all future projects will be written in PHP.

Aside from any possible performance issues, benefits open source software, etc, I’ve come across a few really practical (arguably nitpicky) reasons not to use that M$ tripe:

1. Syntax:
ASP syntax is horrendous! Here a a few common things i do on day to day basis. First I’ll give you the ASP, then the PHP:


Open a database connection and run a query:


' Open connection to database
db = "d:\path\to\file.mdb"
Set dbConn = Server.CreateObject("ADODB.Connection")
dbConn.Open "DBQ=" & db & ";Driver={Microsoft Access Driver (*.mdb)};uid=;pw=;"

' Do Query and get object
sql = "SELECT * FROM table"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open sql, dbConn, 1, 3

// open connection to database
mssql_connect ( servername, username, password );
mssql_select_db(database_name);

// Do query and get object
$sql = "SELECT * FROM table";
$rs = mssql_fetch_object($sql);

Why does ASP require 6 long, hard to remember, lines for something PHP does with 4 much shorter lines? The PHP could be reduced to 3 lines, but if the ASP was reduced to any fewer lines it would lose readability. The structure of the ASP code is much more mishmash. What I mean, is from a purely visual standpoint, the ASP just has too much going on – it’s ugly.


If Statement:


If something = 1 Then
'Do Something
ElseIf somethingElse = 1 Then
'Do something else
Else
'Do something different
End If


if($something == 1){
//do something
}elseif($something_else == 1){
//do something else
}else{
//do something different
}


Granted the ASP is actually a lot more legible in this example (for an english speaker), but the added legibility adds extra keystrokes. Ok, so maybe it’s only 4 characters, but why is “ElseIf” one word, when “End If” is two. WTF?!

Print A variable:

Response.Write(foo)

echo $foo;


2. Multipart Form Data
ASP does not support ‘multipart/form-data’!
webreference.com (thanks google) said it best:

“It is a Shocking Revelation that although Microsoft browsers have supported this format from the moment that Microsoft got interested in the Web, the standard form components they supply for Web serving do not.”

That’s right, if you want to handle form uploads, you have to write your own code. Or find something you can use for free.

3. Reference
There is no good central reference for ASP, but there sure are a tonne of bad references. Whenever i do a google search for something ASP related I get a hundreds of shady pop-up-infested “reference” pages. I wouldn’t be suprised if I got similar results with PHP, but PHP has php.net so I don’t ever have to resort to googling.

The best reference I’ve found is the W3 Schools’ site. But it only contains basic information, I’m quickly outgrowing it.

My final complaint is moot, but i thought it was worth mentioning. You can install ASP on Windows ME, but not Windows XP Home.

W T F ?!

Categories
From The Archives Google Review Websites

IM, OS and Pirates, Oh My

Google Talk

If you haven’t already heard Google released Google Talk Beta on Wednesday, Google’s answer to AIM and MSN. As a nerd I feel it’s somehow my duty to talk about google even though I’m sure this has already been “blogged” about 10,000 times since Wednesday. Wired has already written a review. My two cents: the classic google simplistic design is sheer brilliance as always, I couldn’t be happier with Google’s choice to to use the jabber protocol – open protocols are where it’s at – fo shizzle, voice sound quality is superb – the use of cellphone style connect quality bars is brilliant, i hope they implement file transfers soon, multi-chat is overrated – i hope they don’t include it, tabbed chats would be nice. That’s a quick rundown of my thoughts on gTalk. Next up, windows Vista…

Asta la Vista

I installed Windows Vista Beta 1 (legally obtained, I assure you) the other day. I am definitely unimpressed. Granted I didn’t take a super close look at it. I’m convinced that Vista is going to be to XP what ME was to 98, especially at the rate they’re removing features. The main features I noticed where silly GUI ‘improvements.’ I suppose GUIs are what desktop OSes are all about. But the Vista GUIs features fall into to categories 1) ripping off Mac OS X, 2) stupid/pointless. blah….i can’t talk about this any longer

Pirates of the Spanish Main

I recently moved in close proximity to a Geek Games Store. While waiting for my bus the other day I noticed an interesting looking game in the window, Pirates of the Spanish Main. The publisher is calling it “world’s first constructible strategy game.” It’s essentially a miniatures game, wrapped in the facade of a collectable card game. You purchase the game in packs of cards which punch out like paper dolls. The cards consist of ship pieces, crew members, islands and treasure. The empty cards can then be used for in game measurement, all measurements are in S or L (short or long side of the card), pretty brilliant. The rules are dead simple and the ships are fun to build. So in conclusion, add me to your gtalk list and buy yourself some Pirates! cards i need someone to play with. (cards are water and wine proof btw)

PS. Check out A List Apart 4.0, interesting layout.

Categories
From The Archives Websites

Mutton Button

The old adage about wolves in sheep’s clothes is probably applicable to my new favorite interweb site, start.com/1/. Start.com is essentially a really simple web based rss reader (really simple really simple syndication?) combined with the recently improved MSN search engine. I like the page so much that i’ve made it my homepage, causing me to feel a little dirty every time I load up firefox. I’ve always been a really big fan of RSS, but I’ve never really been able to justify running another application just to check RSS feeds. Things like konfabulator widgets and the firefox ‘live bookmarks’ (or whatever) are ok, but they lack the ‘description’ contents. Unlike most other web-based RSS readers, start.com is completely cookie based, no login required. blah, blah, blah, i love microsoft, send me to hell.

[a few site updates, and probably a news update later.]

Categories
From The Archives

Windows XP Super Poop Too

I came across an interesting bug with the windows xp sp2 “wireless zero configuration” (WZC) client interface while working on a clients network earlier this evening. This client was experiencing a rather odd problem (my favorite kind): she had two computers connected to the same wireless network, both were able to surf just fine, but they were completely unable to see each other locally. Initially my associate and I suspected a firewall, that lead didn’t pan out. So i decided to load up netstumbler and er…stumbled accross something quite peculiar. Keep reading, I’ve recreated the situation for your education.

Fig. 1-1

[missing in archive]

Fig. 1-2

Figure 1-2, shows the ACTUAL wireless access points in range as discovered by netstumbler. You’ll notice 5 APs here, exonet and ivans we saw above. A third labeled “gf” windows decided not to list (upon further observation this signal was not very strong, which may explain the discrepancy). Fine and good, but what’s this, TWO “linksys” SSIDs?! That’s right.

What we have here folks is a classic example of a Microsoft “feature.” The WZC client is either unable to differentiate between the two signals – even though they are on completely different channels and frequencies – or Microsoft has decided to group them as one listing for your convenience or something. At this point I’m cannot determine how WZC decides which router to use. I attempted to connect numerous time, on every attempt I was connected to my own router.

Now, if you haven’t already connected the dots, I’ll break it down for you. The problem with our client’s network was occuring because WZC saw two APs as one and decided to have each of their computer connect at random. We gave the AP a unique SSID, VOILA problem solved, like magic (internet magic).

A concession. After writting this I realized that the bug may not be a problem specific to Windows, it may actually be an inherent flaw in the way 802.11 connects to access points. I was not able to find anything at all about this sort issue after doing some quick googling and a search of the ms support kb. Although, I did stumble across an interesting suport.microsoft.com article entitled Your computer connects to an access point that broadcasts its SSID instead of an access point that does not broadcast its SSID. Apparently this is also a feature, as “Disabling SSID broadcasts on an access point is not considered a valid method for securing a wireless network. Microsoft does not reccomend this practice for any wireless network.” Right… It is a valid state for an access point to be in, isn’t it?