Ok. I've almost finished my B Science in IT. I originally planned to finish last year, but I started a 1 year cadetship last August. Which then stretched my expected finishing date to end of this year. Then I encountered a horror subject in Image Processing and Pattern Recognition, which I've effectively dropped. So now I'm heading into my 5th year of uni.
My cadetship made me question a lot of things. My views on SQL development and the merits of a university education being the two big ones. I was brought up to believe that universities offered a more superior learning experience to TAFE and other technical colleges. That opinion lasted until a few months into my cadetship. I discovered very quickly that the stuff that I had learnt over the past two years was largely irrelevant to my work... maybe except for what little I had learnt in Database Fundamentals. I noticed that my friends who are went to TAFE before heading to uni had better technical skills. Probably from more practical work than listening to lecturers drone for hours on end.
As I moved closer towards the end of my degree, I couldn't help but wonder: is it proof that we've got the skills that businesses would want in their organisation or is really just proof that we can put up with the nonsense that our professional lives will throw at us?
Showing posts with label Programming Problems. Show all posts
Showing posts with label Programming Problems. Show all posts
Thursday, November 03, 2011
Monday, October 17, 2011
Run the program and see if it crashes
I don't have a lot of patience for constructing test cases when it comes to testing my code's functionality. When it comes to GUI-oriented applications, my preference is to run the program and see if it crashes (or behaves in some way contrary to what I had intended). At which point, I would go to whichever section of code is most likely the offending code and get trigger-happy with the logging statements.
This may not be the most effective debugging method for some people, but it has largely worked for debugging my Android apps. "Largely worked" because every now and then I'd have a bit of code that looks like it would work in the way I wanted it to, but doesn't.
This may not be the most effective debugging method for some people, but it has largely worked for debugging my Android apps. "Largely worked" because every now and then I'd have a bit of code that looks like it would work in the way I wanted it to, but doesn't.
Cateogries:
Android,
C#,
Java,
Programming,
Programming Problems
Monday, September 12, 2011
Improvements in debugging?
Is it a sign that you're becoming a better programmer when you notice that you're relying more on error logging to tell you what's wrong with your code, instead of trying to brute force a solution and raging about it when you can't figure it out?
I've only ever encountered one error logging framework before: log4net. I started using it at work when the team wanted to convert the their old error logging framework over. To be fair, log4net was a bit too complex for my liking.
I only started to take error logging a little more seriously when I started learning Android development. I started doing databases a few weeks into Mobile Applications Development - we weren't scheduled to learn it until week 5. It only when I hit a snag in incorporating a database into the class exercise for that week, that I finally began to see the value in using error logging.
Cateogries:
Android,
C#,
Java,
Programming Problems
Monday, September 05, 2011
Android Dev Update
So I finally fixed the problem I had with my Buttons interferring with the ContextMenu, thanks to a useful tip from one of my classmates. This is what my finished tally counter looks like. It may to be the prettiest thing, but it does what I want it to do.
At the moment I'm trying to make a tape calculator. I had a spot of trouble settling on a keypad layout. Should I just have the basic arithmetic keys or should I include keys for getting percentages, parentheses (for grouped operations) and square roots? In the end, I settled for the basic arithmetic format.
At the moment I'm trying to make a tape calculator. I had a spot of trouble settling on a keypad layout. Should I just have the basic arithmetic keys or should I include keys for getting percentages, parentheses (for grouped operations) and square roots? In the end, I settled for the basic arithmetic format.
Cateogries:
Android,
Programming Problems
Monday, August 29, 2011
Programming Problem: Android ListView's ContextMenu isn't being registered
My pet programming project of the moment is a tally counter. Not the sort where you can only count one type of thing at a time and can't remember what you were counting and when you last updated it. But one where you can have multiple counters on the go at the same time, each with a meaningful description and, eventually, a timestamp indicating when it was last updated.
Ok. So you're probably asking why I didn't download one from the Android Market... right?
The answer to that is that making a tally counter was one of my original choices for my final assignment for Mobile Applications Development. But it got vetoed in favour of another slightly more complex one. And I wasn't going to start serious work on the tally counter now if I was going to make it for said assignment...
So I got to the point where I was able to add items dynamically to the ListView and each individual counter was incrementing and decrementing perfectly (verified through copious amounts of logging statements). The only thing that I wanted it to do, but it wasn't doing, was to show the ContextMenu when I long-pressed an item in the list.
My first port of call, as with previous programming problems, was 'all-knowing' Google. After trying several approaches to registering the ContextMenu for the ListView and then inflating the ContextMenu, I was stumped. For anyone who is interested, below is a compilation of the approaches that I tried.
Registering the context menu
registerForContextMenu(getListView());
---------------------------------------
ListView list = (ListView)findViewById(android.R.id.list);
registerForContextMenu(list);
Creating the ContextMenu
menu.add(groupId,itemId,order,title);
---------------------------------------
MenuInflater inflater = getMenuInflater();
inflater.inflate(menuId,menu);
Ok. So you're probably asking why I didn't download one from the Android Market... right?
The answer to that is that making a tally counter was one of my original choices for my final assignment for Mobile Applications Development. But it got vetoed in favour of another slightly more complex one. And I wasn't going to start serious work on the tally counter now if I was going to make it for said assignment...
So I got to the point where I was able to add items dynamically to the ListView and each individual counter was incrementing and decrementing perfectly (verified through copious amounts of logging statements). The only thing that I wanted it to do, but it wasn't doing, was to show the ContextMenu when I long-pressed an item in the list.
My first port of call, as with previous programming problems, was 'all-knowing' Google. After trying several approaches to registering the ContextMenu for the ListView and then inflating the ContextMenu, I was stumped. For anyone who is interested, below is a compilation of the approaches that I tried.
Registering the context menu
registerForContextMenu(getListView());
---------------------------------------
ListView list = (ListView)findViewById(android.R.id.list);
registerForContextMenu(list);
Creating the ContextMenu
menu.add(groupId,itemId,order,title);
---------------------------------------
MenuInflater inflater = getMenuInflater();
inflater.inflate(menuId,menu);
Cateogries:
Android,
Programming Problems
Subscribe to:
Posts (Atom)
