New week, so a new log!
2012-04-02 - Monday - 9:00 - 17:00
Today involved a lot of the worst part of development - testing. Testing is the stage just after you're happy as you've just created your application and works... Until the testing phase (where unless you are a human code interpreter) your code is ripped apart to reveal some major flaws. Even worse when they flaws beyond your control such as C#'s HTTP GET can only deal with URLs of 2083 characters or less. 2083 characters sounds like a lot, but when the data requires a lengthier URL, there isn't much you can do - except tell the user to manually enter the data.
Got to play around a little more with SQL queries, such as:
SELECT dbo.booking.id, 0 AS groupsize, datesub(day,-1,dbo.booking,startdate) as sdate
WHERE dbo.booking.val = 1 OR dbo.booking.val = 3
FROM dbo.booking
Made me appreciate how powerful a language SQL is, though the subtle differences between 'regular' SQL and SQL Server's SQL is very annoying when googling for help!
Note: It's strange how the word 'google' has replaced the term 'search' in mine (and a lot of other's vocabulary) . I wonder if working at Microsoft, and using the word 'googling' instead of 'binging' is frowned upon. Only thing good about Bing is their Bird's Eye view in their maps.
Note to myself - Create a Web User Control in C#:
New Project, ASP.NET Empty Web Application
Add new item, Web Form (Main.aspx)
Add new item, Web User Control (UCont.ascx)
Design view of Main.aspx
Drag UCont.ascx onto the body of Main.aspx
Right click Main.aspx, set as start page
Design view of UCont.ascx
Edit WUC here
2012-04-03 - Tuesday - 9:00 - 17:30
Today was a day of trying to get things working but failing lots. Trying to compile source code, but getting two errors, the first an XCOPY related issue, the second due to me not having SQL Server installed. Another thing was trying to add a user control without relating from the source code, but eventually giving up and realising I will need to build the user control from source.
Par the trying and failing, another thing I'm trying - wait I failed, still need to give it a few more tries. But it was to increase the stability of my CSV parsing by using C#'s inbuilt OleDB to convert the CSV file to a database then extract each cell from the database. An 'in-built' method seems more stable than an 'Alex' method. Wait! I've just realised that my method accounts for slightly messy data, and the OleDB won't account for this. Though to be fair, data from the database should be exported with a constant format that both methods can account for. Still my method is in place and it works, so is there much point in changing? Probably...
Post work: Sorted out the CSV Parser for one the programs, much less code and much more organised. Not sure if I'll make it for the other one. Not much effort, just too tired. Probably will do tomorrow.
2012-04-04 - Wednesday - 8:45 - 13:30 / 18:00 - 20:00
Installed SQL Server Manage Studio 08 ontop of a SQL Server 08 installation, proved troublesome, this isn't an easy install process whatsoever. Transferred source code from netbook to desktop, take quite a long time (guessing the amount of files and I didn't zip the code up). Attempted to build the source code and surprisingly it built first time. So I added my user control, which as expected didn't work, need to build the project ontop of a local database to test. Also managed to fix the XCOPY issue by removed the post-build commands - the old developed had used XCOPY to back up the project on a D: drive, and my netbook not having a D: drive didn't like this.
While waiting for my IP to be added in order to gain access to the server from home, I decided a good use of this time would be to learn some SQL, it's quite a neat language, not liking the case insensitivity though... Downloaded FileZilla and One Click SQL Back Up in order to download a backup of the database from the server and then extract the database out of the compressed back-up, annoying this failed, and it was due to my SQL Server not being SQL Server 2008 R2, so I eventually (later in the evening) installed that, and the back-up has been uncompressed!
Also in the evening I made an enhancement/workaround to update rental rates from Holiday Lettings. Previously Holiday Lettings awful system would spout back an error if there were no rental rates created for a property. The new system works like the below code (but much messier, i.e. lots of booleans, loops ..... and even a goto.....

Work Experience Log #2
Advertisemen
mso 9]>
IF PROPERTY.SETALL() = FAILED
PROPERTY.SETONE( DUMMY_RATE )
IF PROPERTY.SETALL() = FAILED
PRINT( ERROR )
Advertisemen
Tidak ada komentar:
Posting Komentar