Posts tagged with "uts"


C++ for loops with multiple increments

How I've been doing it:

for (; s1Begin != s1End; s1Begin++) {
    if (*s1Begin != *s2Begin)
        return false;
    s2Begin++;
}
return true;

And how I saw my UTS lecturer Gordon Lingard do it:

for (; s1Begin != s1End; s1Begin++, s2Begin++)
    if (*s1Begin != *s2Begin)
        return false;
return true;

Provided one has overloaded the == operator:

if (mind == blown)
    cout << rubenerd.post() << endl;

As for the photo? I didn't make it, it's from Wikibooks. Or at least, it used to be in 2007. Well played in any case ;).


Congratulations @hanezawakirika and @uberlutzer!

Sending huge congratulatory electronic hugs to Clara and a brohug to Robbie for graduating yesterday. There are so many clichés about all their hard work, the exciting opportunities that face them and so on, but they've no doubt heard that from everyone by now. Still ^_^.

Clara will be hanging around to do her masters, and I hope Robbie will drop in from time to time as well :).

Pictured above in all their finery, I can tell those colours will suit them much better than they will on me! About the only thing lacking was my cameratic skills. Is cameratic a word?


LNP doesn't want the university student vote either

University of Technology Sydney: The University of Technology's web site is currently unavailable

Remember my post earlier this week about Julia Gillard and Labor cutting university education spending in Australia? An excerpt from an article in The Age, retweeted by @Sebasu_tan on Twitter:

But [opposition leader] Mr Abbott said he would maintain the changes to university funding which the government announced earlier this month as a way of paying for the increased money that it wants to give to primary and secondary schools.

"I don’t think anyone should expect those cuts to be reversed," Mr Abbott said.

Surprising no one.

The Prime Minister, Julia Gillard, told Fairfax Media that Mr Abbott was locking children into "being left behind".

Rich.


Your new Anime@UTS webmaster!

Today the Anime@UTS club had their Annual General Meeting, where we elected new members to the executive team, ate pizza and ice cream cake, watched Ace Attorney, and generally had a smashing time. It's the second AGM I've been a part of.

Behind closed doors, I was voted in as the club's new webmaster!

As the saying goes, I tend to mistrust any clubs that would have me as a member, but the execs, members and our illustrious president Alex have really created something special here, and I'm looking forward to contributing in a more meaningful way.

Thank you everyone for your vote of confidence ^_^


UTS site defaced with plaintext passwords

Over the weekend, a subdomain at the University of Technology Sydney was defaced, and with it the names and passwords of several staff members. What isn't being talked about much is: it was bound to happen.

Image of computers in UTS Building 10 taken by me in 2011.

Well, bother

According to Michael Lee of ZDNet Australia, the breach affected an older content management system (CMS) backend used to deliver news. Once the system was compromised, the information of staff members was published including their names, email addresses and their passwords as plaintext.

The site also had an ASCII art picture of Zoidberg from Futurama added, performing his trademark roar of exasperation. I see what they did there.

The good news is this breach did not affect the primary site, though it exposes a far larger issue.

The claws of the problem

When I first enrolled at UTS, I was surprised at how easy it was to choose subjects, set up my timetable and get started. Some of my fellow students may scoff at this, but having studied in several places, UTSs system is far superior. They may use Blackboard for everything else, but at least they had the common sense to keep clear of it for enrollment. But I digress.

The one part of the process that gave me pause was when I was prompted for a password. I proceeded to type in a unique passphrase that I'd be using for logging into UTS, only to be told it was too long.

Warning bells.

I've blogged at length about the risks of accessing sites with password character limits, and why they're technically unnecessary in a securely designed site. You can read about it here.

In a nutshell, passwords that are stored securely as a cryptographic hash have no technical reason to be limited in length. When a site informs you of a length limit, it's a fairly sure sign they're storing your password insecurely as plaintext, which means when there's a breach, your password is viewable. Like they were here.

UTS uses student passwords for administration, student email, the Blackboard Learn environment, WPA2 passwords for wireless access, Faculty of Engineering and IT access to student servers, login access to shared computers and many more places. I can appreciate the challenge of keeping all these the same, as students are unlikely to be willing to remember different passwords for each of these.

Still, for an institution of higher learning, I can't help but think they could solve this challenge securely. It dismays me when action is taken only as a result of a breach. I hope UTS uses this as an opportunity to revise their security policies.


Empty spaces

It's fascinating how the exact same space can feel so different simply with fewer people!

It was just over a month ago now when I ventured into my university's inner city library to work on several group assignments. We'd met up several weekends in a row, filled up with coffee from the stand downstairs, and converted caffeine to code and UML. Despite being a "library", it was buzzing with activity, so much so that often we had trouble locating desks to sit at! Packed, noisy, hot, and with internet slower than a busted toaster oven.

Memo to UTS: more group work areas.

Fast forward to now. Given the weather in Sydney over the last few days, I can only assume our local ancient phone exchange was flooded again, rendering our home internet as reliable as a toaster oven door built with slabs of cheese. Where in the hell are theses analogies come from? I was already in town attending various banking duties, so I figured I'd afford myself the use of the university's wireless, and head to the library for a few hours.

Entering the building, the first thing I became aware of was I could still hear the sound of podcast chatter coming through my headphones. It was... quiet. Really, really quiet! As I identified myself to the gate machines with a swipe of my student ID card thingy, I noticed most of the desks were empty. There were computers free. Books were on shelves, not on tables.

Going upstairs and sitting in my favourite couch by the window I used to sit at before I had friends (shaddup!), it struck me just how empty the place was. The people didn't make much of a difference, it was more the complete absence of sound. It was eerie.

Of course, none of this is unexpected, with exams and the semester winding down and with most people heading out for holidays and such, clearly most people weren't as nerdy as me and thought they'd spend a couple of hours there just hanging out! Maybe the [very!] recent memory of all the brain cramming and 11th hour assignment work scared the rest off.

Whatever the case, I've always been fascinated with giant spaces with no people. Maybe it appeals to the introvert in me, but abandoned buildings, or buildings at odd times without occupants... there's just something profoundly different about them that can't just be explained as being an absence of people. Like school during the holidays, or offices on Sundays.

There's something else about empty places that usually have people. And I have no idea what it is.


Hey you, read @jamiejakovBlog

My glorious friend and potential partner in crime Vadim has launched a blog. He's already beaten me in the number of new posts for this month, and we're only two days into it!

Love technology and anime (+some games like SSFIV:AE2012), thats what I’m mainly gonna blog about. I play the trumpet so you might see some music related stuff here too. Love swimming; hey you! yea you! Stop sitting at your computer all day and join me for a swim! Learning Japanese and very into japan, so that will be a very trendy topic on this blog as well ;)

He has quite the thing for Kenny, who wears as much orange as he does! Grab his RSS feed before I break your dam. No wait, that was Stan and Cartman.


100% renewables at UTS by 2015, by @Sashin9000

Flick My Switch! An initiative being spearheaded by my good friend Sashin! Spread the word :D

Comments should be left on the YouTube page.


Updating your UTS transport concession sticker

UTS For those of you with existing student cards wishing to embark on a grand quest to update your transport concession sticker:

  1. Enrol into at least one semester of subjects.
  2. Go to this form site and enter your student details.
  3. Log into My Student Admin and click the ID Card tab.
  4. Click "Email my enrolment details for ID card".
  5. Wait five minutes or so, then check your student email.
  6. Print the PDF attachment, tick the boxes and sign your name.
  7. Hand the form into Student Services on campus and get your sticker.

Clear as mud!


Java enhanced for loops for UTS peeps

A very good friend of mine at UTS and on The Twitters asked about enhanced for loops in Java. I think he understands what's going on now, but just in case I'm putting an example up here!

Caveats

  • In the real world, we don't really use primitive arrays in Java anymore, but given UTS still teaches them for some reason, they'll do for our example here!

  • For some reason I got into the habit of including the above picture from Railgun into my programming posts. Presumably because there's a laptop involved, and I can't stand dry posts without pictures! But I digress.

Regular for loops

Say we wanted to create an application that stores a list of moeblob character names into an array, then print each name out to the screen.

public class EnhancedForLoop
{
  public static void main(String[] args)
  {
    String[] keion = new String[3];
    keion[0] = "Mugi";
    keion[1] = "Yui";
    keion[2] = "Azusa";
 
    for (int count = 0; count < keion.length; count++)
    {
      System.out.println(keion[count]);
    }
  }
}

As you can see, we created an array and populated it with character names. We then used a for loop and printed each character by referencing them one by one.

There's a simpler way!

There are circumstances where a traditional for loop would be preferred (and needed!), but if all you want to do is traverse an array one by one, there's a simpler way!

for (String name : keion)
{
  System.out.println(name);
}

In this loop, instead of referencing each array element by a number, it traverses the array one by one for us, and stores the current element in a temporary variable. In this case, each element in our "keion" array gets put into our temporary "String name" variable! :D

As you can probably tell, for going through an array one by one, an enhanced for loop is:

  • shorter and easier to write
  • the statements in the loop are easier to read, make more sense
  • you don't need to know how many elements there are
  • you don't need to do any maths!

These kinds of loops are common

I'm not sure if you've done any scripting, but enhanced for loops are huge in languages like Perl, Ruby and Python. My personal favourite is the former ^_^

#!/usr/bin/perl -w

use strict;

my @keion = qw/Mugi Yui Azusa/;

foreach my $name (@keion) {
    print("$name\n");
}