PHP, C# and first world problems

So recently I have been working with C#, a programming language which before this year I had very little experience in. The more time you spend with any given programming language the more familiar it becomes and less likely you are to accept the idioms or paradigms of other languages. Very recently I have been working on a little web application which I had made more than a year ago now. The first thing I noticed once I got started again is, I really have improved on the complexity of problems I can understand and the solutions I can provide.

This is something I think that all people do with any skill that they develop over time, not only that but something I will continue to do as time progresses. With this gained perspective, I came to realise something as I started work on this project again; I really hate working with PHP! For the uninitiated PHP is a server side programming language that is very common for people learning web technologies. There are many things to like about PHP, the first being a relatively good online manual which explains how to use the many functions available. More advantages include easy and free to download and use, plenty of good IDE’s out there and available on all the popular OS’.

Unfortunately, with all of these advantages I still find It difficult to get back into using, the main reason is the ORM. Working with C# .NET you have access to a fantastic ORM called the Entity Framework, The brilliance of the system is that within your project you have a model of the data which is behind the scenes. The advantage is that you know what datatypes, lengths and locations of the data which you are working with. I will say that the style of how you perform a query can be a little weird;

ConnectionManager CM = new ConnectionManager;

var return_rows = CM.Table.Where(x => x.Column == 7);

Now you are ready to manipulate rows (as a list) and the data within them with;

var subset = return_rows.Column.Where(x => x.ID == 7)

However, working with PHP and PDO in my opinion is worse;

$conn = connect() //where connect() has my connection string information

$stmt = $conn -> prepare (“SELECT * FROM Table WHERE Column = :Seven”);

$stmt -> prepare(“:Seven”, 7, PDO::PARAM_INT);

$stmt -> execute();

$results = $stmt -> fetchAll(PDO::FETCH_ASSOC);

Then to the best of my knowledge I have to start using loops or similar to manipulate the data. Now I am sure there are many who are more skilled in the language who could show me ways to speed this up however the syntax I find annoying to deal with and I end up writing many statements over and over again to do simple things like select statements.

Now the crux of the problem, I feel like you should always challenge yourself to work with tools you are less familiar to broaden your understanding and encourage you to think in different ways. However, working with PHP again it has sapped all of my enthusiasm to continue work on this web project. On the other hand trying to get IIS or MONO working on my little ARM Linux computer I use for webhosting (locally in my house) seems much worse.


Slight changes

I’m having trouble being productive today so instead I’ll write something so I can tick off something from my “to do” list so I feel like I’m making progress. So I will talk a little about some of the things I have been doing. First and I think most excitedly I have finished my receipt tracking system between myself and housemates. The code is available for anyone to muck about with however it is not adaptable to other people’s requirements at the moment. I think I will go back and make the system a little more robust over time so maybe someone else can use it but for now I feel like I have to move on to focus on some other ideas. I feel I want to learn more and most of what I have been doing with the receipt tracker is polish. While this is important I really need other challenges to learn other skills.tracker

So the next thing I want to do a little of is do some ad-hoc data insights. I don’t imagine to come across any amazing ideas that no one has though of before or anything but I do what to get more familiar with the tools and look at speeding up my methods of data extraction, transformation and visualisation. Part of my idea is to actually get involved with some of the data and community on kaggle.com and see what I can do.Crime by Population Clustering

Lastly I really want to do some more tutorial videos in SQL however I have found little appropriate time to do so. Unfortunately it’s not just a matter of an idea and time it is also finding times when there is no noise happening in the background. My video production skills are not well honed (and yet not the worst I have seen) however I have just changed video production suite so hopefully I will be able to produce some higher quality work soon but possibly with some new mistakes too.

We will see how this new plan goes.

New year…17

Hello all again.

Insert apologies here about infrequency of posts and now let’s move on.

So since the last time I wrote, I have completed my degree at long last and much to my own elation. So now I’m going to try to enter the work force good and proper. I am really hoping to get into SQL Development or analyst role, of course they never really tell you if your degree is enough for a role and experience reigns king in the real world.

What I am wanting to work toward is data analytics and with the help of the latest generation of modelling systems and computer learning algorithms I may just be able to get there. I understand that the road is long and further education is necessary but it is always good to aspire. To help me work toward this goal I am currently undertaking a self paced course on visualising data using excel and have been working though some of the tools in the SciKitLearn python package.

Another activity I have been attempting to do is create some videos to help people get started in SQL. I am using the SQLite dialect because it is so easy to get started with and there are so many good tools to get it working. I remember when I got started in working with SQL and I was mostly taught what the functions and commands were but not necessarily why I would want to use them and how to identify their effects. I want to create a short series which will show off some of these beginner traps as well as refresh myself on these subjects.

The other thing I have been up to is doing some programming with PHP. I now have better understanding than before how and why you would use it. I have often found the best way to start learning something it to do a project with it. So I have caught the automation bug and found a modern slight inconvenience which has probably been solved before and make my own solution. So myself and house mates share some bills together and divide them amongst us. Thus I have made a system that keeps a running total of who owes whom money at any time and the ability to pay off the bills as necessary. The wonderful thing about this project is that I have already finished it, I still need to make sure that other people could adapt the code if someone else in the world would like it (this seems highly unlikely). Currently the project works the way I need it and so I’m happy thus far.

The next thing I am up to aside from submitting an extraordinary amount of resumes is perhaps doing something in C# as it appears to be a common language being used for dashboards as well as integration with other enterprise software. The only idea I have at the moment for C# is perhaps something that keeps track of all of the resumes I am submitting. The only special feature I can think of to make for this is to add the ability to create PDF documents or similar as needed.

So that is what I’m currently up to still learning still making content.

Human Error

Apologies for not writing for considerable time, I have had some health issues and needed some time to recover.

So what have I been up to?

Firstly I am still working on the Filmophile project and am currently getting a few more manufacturer film development times for the database. While I have been doing this manually which is a slow and ill advised prospect this is possibly the only way to get this information legitimately and not stealing it from another source. While I have considered on more than one occasion building an automated system to pull these numbers into the database I would have to build a system for almost every different manufacturer I want times for. This would be wonderful programming practise but ineffective for the number of times we are working with. Currently the database has 1162 unique entries and I will come to the end of the set of times that I have been able to download.

The last thing I will mention on this is it is complicated to understand if these time are legal for me to distribute. My general feeling is even though I am significantly modifying how these times are used the purpose has not changed so it is likely I am not able to redistribute these times without seeking approval from the authors. I find this area of copyright interesting as it all seems very grey, it must be difficult for copyright agencies to work in this realm and give firm advise when these sorts of issues come up.

Other projects I have been up to is working with another person I know at uni to work on a system that incorporates the Brisbane public transport system with google maps. The hope is to create a system which is better for visualising the transport network and give you verbose information on how to navigate the network. For me the project is quite challenging as it is working with technologies that I have very little familiarity with. It has been fantastic at pointing out what I do and don’t know and is a fantastic challenge. I will talk more about this project as there is more substance to it and hopefully some hosting happening.

Lastly I have got back into the darkroom. I am a huge fan of analogue photography and have collected enough equipment over time to have a darkroom. However only recently I was able to get some space together to leave the equipment set up which make it a lot easier to work with. I have had a huge amount of fun working in the darkroom to produce some pictures which are entirely analogue. Ill leave you a sample at the bottom of the post. Be aware that i only took a photo of a photo which is probably the worst way to show off what I have done however you may find it interesting to see.

Hoping to get back into writing more regularly.lagoon


Being part of an I.T. Degree I have largely been able to avoid referencing, as far as I can tell this has been a good thing. Over the summer I did a group teamwork course which was about the theories of learning and group organisation fundamentals. There was some referencing in that but I did my normal thing of looking up papers and going onto easybib.com and manually copying the reference lists and citations as I figured it wouldn’t be that difficult for the 1500 word assignments.

To the best of my knowledge this has worked well and no one has complained about my referencing. I have often though word has a references tab which everyone seems to ignore. I have used the similar tab on LibreOffice but only when there were no marks directly given to referencing. To me referencing is a super pedantic world where everyone who takes it seriously is missing the point.

The reason why we reference is so that we can back our arguments up with the work of others and so that those reading can find the information we are using. This is very important, however as long as the system works and everyone understands then there is no problem. Then immediately we add structure to make it easier for everyone to get their information faster. This is still fine however now it has got to the point where people are losing marks on assignments because they put their citation after the comma and not before, or they put the first name first and not the last name.

If it is so important that these things are always correct then we need to create a system which accounts for these problems. This is where computers come in, in many ways the things I am thinking of have already been put into practice but are not necessarily universally accepted. It always annoys me when you use one different systems of referencing and the amount of context for an argument can differ. I mean sometimes you cite a page or a chapter or maybe an entire journal. All of these are correct and yet none at the same time.

Without calling for another standard wouldn’t it be nice for all academic papers to dynamically link to what the author feels is relevant for a point. That may be an entire journal but maybe that is required for their point to be made. You know we have had websites and interactive note books for a while, if you look at data based science they are moving to interactive notebooks so people can see how they filtered and arranged the data and get reproducible results. Couldn’t these ideas be out forward for a new generation of academic writing? No more caring about commas or if you use a p or P to signify a page number. Just click a link and away you go.

I’m sure when you get down to the brass tacks of it there will be something to do with copyright law and publishing companies holding all of this back but It would be nice to imagine a world where instead of referencing you can follow the information and ideas from start to finish without manually cross referencing yourself.

My Guide to Keyboards

To those of us who spend a long time using large desktop computers the keyboard is something you spend a lot of time using and hopefully very little time thinking about. Sadly for me my keyboard broke a few weeks ago. I was not particularly attached to my old keyboard, it had some issues that made it annoying at times but it was still usable. It had some functions that were silly like a cooling fan for your fingers but it also had some features I quite liked such as back lighting and macro keys. This meant now with the keyboard dead I could assess what was new in the market and see what I could get that would hopefully get me all the features I wanted for little cost.

A little bit of background as to why I care so much about keyboards. Firstly I can touch type, now for the purposes of this argument touch typing is where I can stare at something I’m reading and type it at the same time. I am not the fastest typist but a new keyboard takes a little bit of time to adjust to because I rely so heavily on muscle memory to type. Secondly I learn’t to type on a mix of electronic typewriters, mechanical typewriters and early 90’s computer keyboards. All of these have fairly separated keys with long travel distances if you wish to compare it with your average laptop keyboard, they also had a fair bit of resistance and tactile response whenever you were typing at speed.

So what was my old keyboard then? A rubber dome medium travel full size keyboard. This while not unusable was not ideal, it worked plenty fine and I was even able to type at speed with it for those longer report based assignments. The reason why I originally got the keyboard as for a couple of reasons, firstly it was cheap, second it had macro buttons and third it was backlit. As time went on these features changed in their importance to me. When I got my keyboard I was mostly playing games and web browsing so keyboard use was pretty basic so the ability for it to work and not take up too much of my desk was about it.

Now some five or so years later things have changed a bit. I am gaming a lot less, I do the occasional bit of programming and I do the occasional assignment which can span for as much a 40 pages. Needless to say my demands have changed. So when one morning I turned my computer on and the lights on the keyboard didn’t I knew it was time for a new keyboard. Sure I could have opened it up and tried to figure out what happened to it but this was a great excuse to finally get a new keyboard that is suited to my needs.

So my list of things that were essential on the new one were;

  • High set (long travel) keys, this is the old keyboard design where the keys travel about 1cm when you press them down. These types of keys usually have very good separation between the keys.
  • Macro Keys, while I do not use these very often when I do I appreciate it. This is a feature that I mostly use for gaming but comes in handy sometimes for repetitive tasks.
  • Media Keys, I may very well be the last person who uses a media player on my desktop and I do like being able to control volume etc. from the keyboard.
  • Num pad, I really like them, I don’t care about the extra space it takes up. When you do the occasional 3D modelling it is super helpful.
  • Quiet, my housemate hates loud clicky clacky noises.

Things that would be nice;

  • Back lighting, even though I can touch type it is still nice.
  • Detachable USB Cable, I don’t often detach my keyboard, but when I do I prefer to do it on the keyboard end rather than the computer end.
  • Ergonomic design, I really like the Microsoft ergonomic series so I figure it would be worthwhile looking at.

One thing I really was not set on was mechanical vs rubber dome keyboard. This is a whole subject unto itself, suffice it to say that mechanical keyboards with micro switches are all the rage at the moment and if you want fancy features on your keyboard it appears that not many manufactures are including rubber dome option. In some ways that made my mind up on the matter and thus the question would be which type of mechanical switches to get. For the uninitiated there are many types of switches with different spring strength, actuation force and tactile feedback. Again my requirement was quiet which narrowed down the options to only two or three types.

To save you a long and tedious story about all the different things that were options ill just jump straight what I ended up with. It is the Cougar Attack 2, a fairly unknown brand here in Australia. There is nothing particularly special about this keyboard except that the price was right and it wasn’t gaudy. While it is not perfect and could be a little more feature packed it does not make any of the common mistakes that some other brands do. Firstly you don’t need any special software to run it like many other “gaming” keyboards. This is great I don’t have to have another silly program load on start up! The only down side to this is I can’t do stuff like have macros with delayed key presses and create obscure shortcuts and save them to the keyboard. The only other thing that would have been nice would be back lighting but I never considered this a necessity.

What I really bought was more comfortable typing, and this I defiantly have. Without using any silly romantic marketing talk the keyboard works as intended and the separation of the keys coupled with the longer travel means I can now type at speed without looking at the board at all (unless I need ^&*$#@, I never can remember where they are). It means that using my laptop for typing (like I’m doing at the moment) is slower and more annoying to me.

So why write a huge long mostly pointless article about computer keyboards? It got me thinking about the process of how I buy pretty much anything, I sum up the options and then pick on. But more than that I often find that the “market leader” or the current product with the rave reviews rarely meets my requirements or expectations. It makes me lament how there seems so few reviewers that I agree with. This is at its worst when I look at digital cameras. Many years ago you had photographers reviewing cameras, now you have tech journalists doing the same. The reviews focus on different things, the conclusions are often very different. I found that review sites for computer hardware didn’t give me much insight into the current state of the market or narrow down the options of what I should buy. While I am not about to decry reviewers for not being able to tell me what I want (this really isn’t their job) I just feel that a little diversity in this field would go a long way.

To conclude …. New keyboard, pretty good. Better than old one. Wont have to think about it for another five years or so.

Super Alpha

I have finally got my project “Filmophile” up to what I am willing to call Alpha One stage. What is an alpha I hear anyone who hasn’t been disappointed by a video game release within the last five years or so. Alpha is the software development term for NOT READY YET or ABSOLUTE MINIMUM SO YOU CAN SEE WHAT I’M TRYING TO DO. Traditionally alpha’s never saw the light of day, it was synonymous with tech demo or proof of concept programming, never designed for the public to see.

These days alpha just means not done yet, after the alpha stage historically is the beta stage when you allow people to see what you have done and gather feedback on what has been made so far. Finally is the Release Candidate stage where you are giving people the chance to see not fully bug fixed products that are pretty much the same as what you will release as the vaunted version 1.0.

What happens now due to the open source community where those who program the code don’t really own it so you may as well get it up for all to see as soon as possible. The idea being that anyone who wants to can pull the code and get started working on it early as lets face it in my case anyone who would want to pick up the code after me will be better than I am a programming. The flip side to this is often games are released in an alpha state to encourage people to buy the game early, this helps gauge interest and help pay some bills early. The downside to this approach for games is it is often very tempting to never finish a project.

So what is Filmophile?

The project is a program all about old fashioned film photography development. Back in the days before digital and even before colour film you processed black and white film in all sorts of probably dangerous chemicals. For each probably dangerous chemical your film would require a different processing time and had the possibility of changing the image like how contrasty or how grainy It looks.

So the idea is that between myself and anyone who wants to help me I will collect a large amount of these times and their effects. Once that is done add them to the program and then anyone who does film processing won’t have to look up times online they can just use their stand alone program to do so. Filmophile integrates a timer so if you happen to have a computer in the same room that you process your film you can use it instead of a stand alone timer. Not the most useful feature but I might use it so why not.

As anyone who has programmed anything ever I have many feature ideas that I would like to make but I have no idea about how to do it and may never get around to doing so. Here are some of my ideas

  1. Add calculations like hyperfocal distance or push pull times.
  2. Make the program save what you were last up to.
  3. Add the ability for you to use a custom database or just use manufacturers/your own times.
  4. Make the whole thing look less like a program from 1998.

There are many other even more ambitious ideas but ill get to them in time. In all probably I will get Filmophile to a point that it is useful and then move onto making the project a little more in line with my degree which is based in databases. So the idea would be to recreate this idea but using a NoSQL database solution like MongoDB. Perhaps have a “cloud” version of the program or maybe even make the current one multi-platform. All of this Is just conjecture at this point however I will take this opportunity to ask people who know about film development to fill out my Google Form telling me of all the fantastic ways that you like to develop film.

You can check out this alpha Source Code  here. Be forewarned that you need to have Python 3.3 installed and have some kind of understanding of how to use it also it currently

only works on windows. I suggest anyone who would like to look at the source code download something like PyCharm from Jetbrains or Sublime text to look at the code effectively.