Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
User Journal

Journal Journal: Breeding Code Monkies 1

I'm not a great programmer. I once left out the following line of code
from a very well used program and it cost my employer about $40k-$50k

"chomp($daemonReturn);"

However, I must thank the unix world for making me a fair programmer. I
have a reasonable understanding of what's going on under the hood. I've
quick-patched programs when the errors pissed me off. I've learned a great
deal from browsing source of some truely amazing projects. (TOra) Without
open source, and the "pull yourself up by your bootstraps" mentality the
unix world encourages, I wouldn't be a competent programmer.

What sort of mentality does Microsoft encourage? Hand holding. Pure and
simple. Lack of control and lack of disclosure promotes hand holding.
Here's an example.

DBI allows one to get the value of the sequence of the last inserted row in
your session. (might be DBD, I dunno, I'm not an uber-cool DBI hacker like
my big bro.) I hoped that ASP had something like this too. However, every piece of
documentation I looked at wouldn't tell me how to get it. Finally, I found
a TUTORIAL on 4guysfromrolla.com about how to select the value of the
identity field! A TUTORIAL that taught me to "Select @@IDENTITY!" Windows people write tutorials. Unix people
write documentation. The quality of documentation is fairly high because
it attempts to be concise and present facts. The quality if tutorials is
awful because it's susceptable to the intelligence (or lack thereof) of the
author.

Most Microsofties don't really know what's happening behind the scenes.
Example:

search for the words "ASP include" in google. You'll find several
TUTORIALS covering ASP INCLUDE FILES. You'll find 3 different explanations
for how you MUST use them (all work in one way or another. It's basically
depends on the one combination that the author found while he was blindly
editing code...) BTW, What the fuck is an ASP INCLUDE FILE? Oh, you mean
Server Side Include file? How does this have anything to do with ASP? It
doesn't. Plain and simple. (Theyr'e different DLLs. ssinc.dll and
asp.dll) ssinc.dll gets run first and is totally ignorant of languages or
file contents. But there are ASP programmers out there that would have
you believe that you MUST include your <!--#include file="blah.asp"--
> statement between ASP <% %> tags! I'm sure you see that this makes no sense.

I hate stupid people.

User Journal

Journal Journal: Microsoft Documentation Sucks!

With this entry, I'll expose a little bit of my ASP ignorance and some shortcomings in the M$ MSDN ASP documentation.

Unix encourages small, reusable bits of code. Pardon me for trying to bring this beauty to the windows world.

IIS allows server side includes. These includes happen before the page gets passed to ASP.DLL. This is great if you want to include a function library. Now, what if you need to include a file based on some criteria only discernable by ASP?

If Session("usercode") > 1000 then
<!--#INCLUDE file="../includes/admin.asp"-->
end if

This works and it doesn't...The inclusion happens regardless, but ASP has the choice at run time to not execute the code. This doesn't work if your include file is a library of functions. Furthermore, in the case that you have Lib A and Lib B which both require Lib C, (no not glibc, I wish!) there aren't inclusion guards so you'll end up redefining Subs and Functions and variables.

Oh, wait! There's a solution! Server.Execute()!
Here's what microsoft says about Server.Execute() in their MSDN Doc:

"The Execute method calls an .asp file and processes it as if it were part of the calling ASP script." (quoted w/out permission, fuckheads)

AS IF IT WERE A PART OF THE CALLING ASP SCRIPT!

This part is untrue. If it were truely A PART OF THE ASP SCRIPT, I would be able to call functions located in the Execute()d script from the calling script! However, after the Execute()d script is finished running, it gets UNLOADED. (according to the wonderful people over at 4GuysFromRolla) They even mention that my specific situation and say that it is a common misconception. Hell yes it's a common misconception! That's because Microsoft can't write documentation that is thorough! No wonder there are so many ASP help sites on the net. They need them because of the lack of good Microsoft documentation.

fuckheads, i'm going back to Linux/perl.

User Journal

Journal Journal: An oldie, but a goodie

Today's offender is actually an old story, but it has bothered me for 2 years now. My first semester in college, I did some lobbying and got myself excused from freshman CS classes. On to CS331, Data Structures in C++! The professor was an idiot C programmer. We argued about most everything. By the middle of the semester, I found it easier to keep a tally sheet of his lecture errors and distribute the sheet with corrections to the class via email afterward. By the last third, I didn't care anymore.

"Yes professor Glass, 'new' does return NULL on fail, just like malloc()."

Final project time. Use some sort of data structure (don't remember anymore) to facilitate building a VRML generator for a couple defined shapes. Simple enough. Well, i slacked and slacked and had the program written and running free of fatal errors, but my VRML wasn't quite right. On the last day, I took it to the lab and diffed the output of my program against the sample file. WinDiff, distributed alongside Visual Studio, reported no differences between the files. Somehow, Cosmo wouldn't view the VRML file I had made. I refused to leave after the project deadline. (end of lab on the final day of the semester before finals.) The TA stood behind me while we meticulously picked through every line of VRML side by side with the clean copy. Down about half way, WinDiff, which had been instructed to consider whitespace meaningful, missed an extra space between two tokens. Apparently, Cosmo was whitespace sensitive. I changed the space and tried it in Cosmo and it worked. The TA was ready to give me an A on the project when the prof. walked in and saw me sitting there past the deadline. He wouldn't even hear my case. I hope IIT fired that jackass. Boys and girls, stay away from the Illinois Institute of Technology.

User Journal

Journal Journal: Wow, another already!

So I sit down, feeling relieved that I've been able to bitch about some of my microsoft problems and I found another one that couldn't wait until tomorrow.

MSSQL Enterprise Manager again:

I'm in the early development phases of a new project so I'm forced to manually edit database tables in this excel like gui EM provides. It's actually quite handy and saves me typing tons of SQL. However, I was editing TblContainerProperties, a table that has never had a single constraint or IDENTITY column. (IDENTITY is a built-in sequence) Granted, all the rows should be unique, but I didn't need or want to enforce that anywhere but the software. I accidentally insert an identical row, but I don't realize it until I've completed the next row. I go back and try to change the values to make it a usable row and EM tells me "Key column information is insufficient or incorrect. Too many rows were affected by update." WTF? I can't delete the row either. So, I go to SQL Query Analyzer (it probably does cool stuff, but I use it to manually type queries and stored procs.) and delete both rows and then re-create the row in EM. bitchez.

rnh

User Journal

Journal Journal: Just a couple to get you started:

MSSQL Server Enterprise Manager Error:
    I ordered a DTS transfer of objects and data from our production env to our devel env. However, I forgot to delete the objects on the devel server first and I didn't click the "Delete destination objects first" option. However, DTS reports "The operation completed successfully."

    I'm forced to use dreamweaver. Please, no flames. Dreamweaver 4.01: I'm copying our devel tree to the devel web server with DW. I drag the source folder from the right pane to the left pane, but I momentarily forget where I'm putting it. (this manual dragging is necessary because we can't use the auto publish features for some very good (and bad) reasons.) DW counts to 3 and decides that it's going to drop the folder into the one I'm hovering over, even though I didn't unclick the mouse button. It picked the most unfortunate folder and it took me 30 mins to re-create the web server environment. I've verified that this is a bug and not a "me" problem.

User Journal

Journal Journal: Journals? 1

Journals? When did this happen? Oh well. I never really use most of the /. features anyway.

So, in my attempt to be novel and prove myself a deep man, I've decided to do something different with my journal.

You see, I had a nice job working w/ Perl and Linux at a .bomb. (a large one, more like a .a-bomb.) I got fired in Oct 2001 and now I'm working w/ ASP and IIS to get through school. I'm sure you can imagine my daily frustration.

I'm going to turn this into a collection of stupid Windows software errors I encounter throughout the days left in the contract.

Happy reading!

Slashdot Top Deals

panic: kernel trap (ignored)

Working...