Search
Blogging from Sydney | Australia
Some past thoughts
« What's a backup solution? | Main | Adding G+ to a SquareSpace Site »
Monday
Aug082011

I always seem to forget to blog...

Which is why I should do so more. You know, practice written communication skills, seem organised and on top of things (though I don't recall missing an assignment deadline or copping a late penalty in the last 4.5 years of uni...bonus marks excluded because sometimes they are ridiculously hard and thus fun, but not necessarily solvable)

One thing I should have blogged a week or so ago was the sheer joy at being reminded of:

#define char UINT8

Now...this line was written by one of my professors for COMP343 Cryptography and Computer Security  @ Macquarie for a project early last year. No one in the class could figure out why our simple cryptalg.cc was simply not producing the results we expected when compared to a desk check of the algorithm, though a tutor spotted it early enough on he never explained why his fix worked.

Have a think about the above line, is it correct?

While you think, a little on the trigger SN311 and the tweet:

@leolaporte @SGgrc RT @slashdot: 13-Year-Old Password Security Bug Fixed http://bit.ly/luI3gJ

The signed/unsigned thing has been biting programmers for a looooong time in languages it is relevant to :)

If you haven't figured it out (probably because you aren't a coder), the following line probably won't help greatly either:

#define char UINT8

#define unsigned short int UINT16

Even the first year programmers should be able to see the issue by now - char by default is a signed data type in C. Thus one fix in this context is:

#define unsigned char UINT8

This and other quirks of C are why personally, I prefer Python, Java, Scala and even C# far more than C/C++ these days (though there are times when C/C++ is useful and it was the first real programming language I learnt). Today the performance argument is almost moot, even Cassandra was written in Java. It feels like it has long been argued that programmer time is more valuable than computer time - to the point that internet behemoths like Google, Amazon and Yahoo have huge farms or datacenters of thousands upon thousands (if not millions) of servers and far fewer employees.

References (26)

References allow you to track sources for this article, as well as articles that were written in response to this article.
  • Response
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Response: mutuelle optique
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Response: assurance santé
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Response: mutuelle
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Response: Isoetaceae
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Response: textiles
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Response: www.markedrp.com
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Response: kitchen Cabinet
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Response: Phytoceramides
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Response: Arzu
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Response: shoes
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Response: Val
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Response: netoraton.es
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    Peter Schmidt - Blog - I always seem to forget to blog...
  • Response
    It is absolutely true that education teaches a human the true values of humanity since every has to be learned or experienced in the world for at least once so it can be understood that no child would ever learn the basic human values until he sees them in practice.
  • Response
    Response: paper writer
    It was amazing and these services are all helps to good written communication skill learners. So that I am very happy to utilizing the services and assignment deadline and more interesting steps are useful to us.
  • Response
    Response: claudine
    I found a great...
  • Response
    Response: Bug Cleaning tips

Reader Comments (1)

why you always seem to forget to blog...

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>