• Behind

    Nov 25, 2009

    At present I am a little behind on my lecture note reading and optional exercises that have been set in them. Will be working on this until I'm caught up again.
    Until then my Programming Practicals will remain alpha sting-less. Hopefully they won't be on the back seat for too long.
    Also looking for a realistic project that I can work on. Something unique and web based to get it out there. My one idea I found to already have been done by Google. But I may be able to do it after-all and locate the same type of thing in one location. Maybe even using Google's API. Lots of spare time learning required for that. I think it could be worth it in the end though.
    Suggestions welcomed for a project!

  • T1 - Programming Practical 6

    Nov 25, 2009

    Calculate the average and standard deviation of a set of floating point numbers.
    There was nothing stated that the user was required to input the numbers. For speed I hard coded the values in. This also enabled me to check the results beforehand.
    Syntax highlighting thanks to pastie.org

  • Ill and Fed Up

    Nov 19, 2009

    Well sadly I have missed a total of 3 lectures in the last two days due to the fact that I have some form of flu. Never had anything quite this bad before; weakness, loss of appetite and worst of all fever. Thankfully one lecture I already understood beforehand so I don't feel as though I missed out on a lot there, however I missed one on binary shifts i.e. division and multiplication.
    Thankfully Blackboard is there to help me with that matter. Lecture slides being on that and very explanatory means I can make up for the lost ground there.
    Recently bought the Software Engineering textbook. Should be an interesting read I think. Useful throughout my time here too hopefully. Might help me with my planned project of creating and possibly developing a game using XNA, which first I need an idea/story for. I'm thinking space-based RPG. Ideally real time combat... but more likely and probably easier to implement would be turn based much like Final Fantasy. All in 2D graphics to begin with I think. But practicality may show me that its over-ambitious.
    Hoping to make my 4 hour stretch of lectures tomorrow morning. But only time will tell for that. As I am right now I doubt I could concentrate that long/that it would be beneficial to my health.
    Been bored in my spare time lately. Wondering what else I could do other than Watch on-demand TV or listen to music. Possibly something that will benefit me in my course.
    Had a sinus infection and possible bronchitis. Not really doing too well health-wise here.
    Edit 2:
    Confirmed. Now on antibiotics. Shame that I had to pay. Used to getting prescriptions for free. Heard and felt my rib crack again this morning (again being that I had it happen in secondary school too)

  • T1 - Programming Practical 5

    Nov 18, 2009

    A program must be developed to take an input of a year from the Gregorian calendar. This must then print the day of the week that the 1st of January will be or has been in that year. The user should be able to enter a series of years until a sentinel value is entered, or to enter a range of years and print a response for each year.
    The year’s affected by user input must also be analysed for leap years and leap year exceptions in order to output the correct day of the week. The valid expected year range is from 2000 onwards.
    In order to check if the year is a leap year it must be divisible by 4 and, if it is a century year, also 400. i.e. 1900 is not a leap year as it does not divide by 400. So it must be divisible by 400 and not 100 to be a leap year.
    The day must be calculated by finding the difference between the year that the day is being found out for and 1900 then this casted as integer (rounded down) when divided by 4. Then this number being added to the difference and being modulo 7. Unless the year is a leap year then the value added must be decremented so that the application occurs after the leap day itself.
    The output should be in the format:
    I feel that the way I implemented my solution to this problem was rather messy and that this could be avoided.
    I intend to sort this in a future program along with the Alpha Sting for this practical:
    Extend your program so that it can calculate the day of the week for any date between 1st January 1900 and 1st January 2010.
    In the future I may alter this to use functions (as it would be better practice).
    I am hoping to find a way of increasing the width of my main column to show a kinder program layout.

    Syntax highlighting thanks to pastie.org