Sunday, March 14, 2010

Come and see the violence inherent in the system... Help, Help! I'm being repressed!

I've come to the conclusion that I need to go fishing. The reason I say that is that I just spent the majority of the morning smashing my head against the proverbial brick wall trying to get crap to display using session variables. The story goes like this ... (wavy going back in time cliche inserted here):

Back in week one of the diploma, we were given a lesson on "Session Variables". Unfortunately, I didn't start classes until week three, so I missed out on the collective wisdom that our resident programming guru, Rachael, had imparted to the class. (See Jake, that's how you suck up, not like your lame effort last week mate). Anywhooo, I managed to fudge my way through based on the worksheet that I printed up from Google Doc's, but for some reason I couldn't get anything to display -this was after I spent about an hour sorting out errors in my code.

So, I mucked around with the code behind file and eventually, I was able to get something to display. Success right? WRONG! I was displaying the selected index properties of the drop down lists, and not the selected item properties. Well, I mustn't have known the correct way to phrase the question when searching for the solution in my books or on Google, because adding .SelectedItem to any of my code just threw up errors.

Anyway, just before I got to the stage where my robes were rent asunder, and I covered myself with sack cloth and ashes, I discovered that I wasn't putting .Text after .SelectedItem in my global declarations.

When I was 18, I penned two phrases, which I put up on my bedroom wall:
  • If you want to run my life, pay my bills!
  • People are basically morons!
The second of those has never rung truer than it did today.

Tuesday, March 9, 2010

Data sharing with sessions.

"Session" is known as a collection object and is closely related to "Application" (also a collection object). Session state stores variables and objects for one particular user for the duration of that users current visit, while the application state shares the variables and objects of an application between all users of the application at the same time.

The session state is stored on the server and allocates each user free memory for the temporary storage of objects. Whilst session state objects will linger after the user leaves the site, the session variables will disappear after a certain period of time.

This post was written with input from dev newsgroups, and also sitepoint's "Build Your Own ASP.NET3.5 Web Site using C# & VB" by Christian Darie & Wyatt Barnett (3rd Edition) pp 178 & 187-188.

Wednesday, February 24, 2010

Getting back to it...

So, I started back at TAFE today. We spent the morning session doing critiques of shopping websites -their usability issues, what they do well, what they do poorly and so on- which was very in depth.

We moved on to class diagrams in the afternoon and covered "setters & getters", which we didn't do last year. Setters are procedures that allow you to change a value of an object. Getters are functions that allow you to view the value of an object, without changing the value.

Oh yeah, and I created a table in SQL2005 using Visual Studio 2008.

Shopping website critique

This is a brief critique of the City Software website, complete with a product taken through -almost- to the point of purchase. I would have gone all the way, but I would most likely have had divorce papers waiting for me when I got home.











Tuesday, February 23, 2010

First Blog for Diploma 2010...

This is my first blog for 2010. I have just started the Diploma part of my course, and this blog makes up part of my assessable marks.

Please stay tuned for all sorts of insights -and laughs, my God will I supply laughs. If there was a programmers stand up club, I would be a star- and, well, just general bollocks really.

Monday, August 17, 2009

Database types and definitions

This weeks blog task has two parts:
  1. What is a database? In our own words, describe what we think a database is.
  2. What are the different types of databases? Give examples of the different types of databases.
Wikipedia describes a database as:
A database is an integrated collection of logically related records or files which consolidates records into a common pool of data records that provides data for many applications.
If I was putting this in to my own words, I would describe it as a collection of information that is structured in such a way that any relevant information is easily accessible.

The second question is open to a bit of interpretaion. Many of the answers in the class had things like MySQL, Oracle, Access, SqlServer. According to WikiAnswers, the different types of databases are, "Hierarchical, Network, Relational, Object Relational".

Sunday, August 9, 2009

Studying for Chapter 8 test...

One of the questions in the practice test was this one from the True/False section:
  • 8. Only six different types of exceptions can occur in a visual basic program.
Now, I don't know about you guys, but I looked, read then re-read the chapter, headbutted the wall (thank God we don't have a cat, for it would surely have been kicked) and yet I still couldn't find a definitive answer to this question.

I know, I know... Page 592 has a table with six exception types in it. But I direct you to the paragraph above the table:
Different types of exceptions can occur. The table shown in figure 8-46 identifies some of the of the possible exceptions.
Does this meant the correct answer is False? The table after all only shows six exceptions and it doesn't say anywhere in the text, "This list is by no means exhaustive or complete" etc. So you could probably make a case for saying that the answer is True if you really wanted to push it.

Anyway, I went searching and found another, larger, yet still by no means exhaustive, list of exceptions. It can be found at http://www.exforsys.com/tutorials/vb.net-2005/vb.net-exceptions.html and succeeds where the book fails, gives us a definitive answer to the question.

And just in case you are wondering... Yes, I am grumpy. Bloody Cats!!! Someone must have swapped their playbook with The Hitchhikers Guide to the Galaxy because it apparently has the words "Don't Panic" written across the front in large, friendly letters. Yeah right, 7 of our best 22 out injured and another 6 of them playing with injuries or just out of form, four weeks from finals... Nah, don't worry about panic, I think we've moved beyond that point. Next stop, despair.