Posting Code How-To’s Online
This is something I've given quite some thought to in the recent weeks. I recently moved for a job in software development, and as I'm sure many of you can imagine, sometimes you get stuck coding and turn to your favourite search engine for advice. More often than not you'll get taken to StackOverflow, a blog post, forums/message boards and finally, official documentation.
All of this got me wondering...when you post code help via StackOverflow, or how-to's on a blog, is it done with the intention of actually distributing that code to others for use how they see fit, be it in a commercial application or a personal project the reader might be working on. I think it's a very grey area when you delve into it, after all, I wouldn't mind other people using my code in any shape or form, in fact I'd find it quite the compliment! Sure it'd be quite nice if they sent an email or left a comment to say "hey, this was just what I was looking for and I've used it for XYZ" - it's nice to know that you've been able to help someone solve something.
On the other hand, if I was being picky about this, especially as my line of work currently sees me developing in C# (and not via Mono either), I could throw licensing into the mix and say that people are free to use my code as long as they have my permission and reference that they've used it somewhere. This in turn would present a company with issues as to whether they could actually use it or not, because that kind of license would almost certainly be some sort of Open-Source license, meaning that they almost certainly wouldn't use it, because it would then mean they'd have to contend with satisfying the requirements of an Open-Source license.
I think there's several issues here that I haven't even touched upon, but it made me stop and think about it, so maybe it will provide you with some food for thought too.
Some MySQL Fun
I'm currently writing an application which will be running from a MySQL backend, along with a good friend of mine. So we get to play with SVN, as well as MySQL. I'm wondering whether it would be worth setting up MySQL replication on one of the servers, as we have 2 to use if we need them. Possibly even 3.
If anybody has some good guides on how to set this up, it'd be great to hear from you, now I have my install set up to allow the test user to connect remotely, I'm looking for another mini-project to include in this larger one
Also...if you notice any DB oddities on here, please forgive me
Long Time No Blog
Clearly I haven't blogged for a while - this was evident by the fact I had a wordpress upgrade waiting to be done, and no less than 8 plugin upgrades!
Now normally, I don't mind being all long winded about plugin upgrades, because it's usually just one or 2. Now because I'm picky and awkward, the WP auto-upgrade for plugins doesn't seem to work on my server. Instead of fixing that, I simply wrote a bash script. The contents of which are:
#!/bin/bash if [ $# == 2 ]; then new=$2 else new=$1 fi if [ -d $1 ]; then rm -rf ./$1 fi wget http://downloads.wordpress.org/plugin/$new.zip unzip ./*.zip rm ./*.zip
Not sure if anybody wants to use that - I'm sure it could be improved, but it satisfied 2 of my needs. I now have an easier way to update (and install, I guess) plugins, and a lesser desire to code things. I now have to think of my next blog topic so I can get back on track!
Programming Ideas
So while this has nothing to do specifically with Ubuntu, it's more a request to the community
I've recently dabbled with some PHP & MySQL on a test server running from my desktop, as I've been meaning to learn PHP for a while. I think it's gone OK, I've learnt quite a bit, but it may help that I know some C (setting variables is very similar etc.). What this little PHP learning experience has done (other than taught me some php), is reignite my passion for programming.
I've always enjoyed programming, that doesn't mean I'm fantastic at it, but I really do enjoy it, the only thing I really struggle for is ideas for programs/applications. What my request to you - the community - is, is whether you struggle for ideas as well, if not, then do you have any you'd like to suggest?
SVN
First off - I'd just like to point out that now Planet Ubuntu should be getting all blog posts from here
Secondly, I've set up a local SVN repository (without apache access). This is mainly just for my coding, which I seem to be doing a lot of at the minute, so I figured in my downtime from that, I'd set up SVN.
It was pretty easy, and I have Netbeans (we have to use it at Uni, I've grown to like it though, it's pretty good) set up to commit to the svn repo's for the various projects etc. Which was also incredibly easy to set up. I'm pleased I did it, whether it will be used remains to be seen. Either way, I think I better get back to coding this interface! So far I'm doing ok (though I've not got more than 1 class so far either...)
Jaunty Java
Ok so this post has nothing to do with Jaunty (Ubuntu 9.04) & Java as a whole, it's about the 2 separate subjects, and my lack of knowledge regarding them (currently!).
So I'm thinking that when I've got a bit of free time I'm going to try Jaunty in a VM, just because I've not actually tried it at all so far, I'm a bit disappointed in myself! From what I've heard on IRC and generally from people using it, there's been the usual breakage of some things, but that's to be expected. Other than that I've actually heard a lot of positive things about it, so I'm looking forward to actually installing it on my system
As for Java, some of you may know that I'm on a Software Engineering course at University. This means I do a fair amount of programming and general sitting-in-front-of-a-computer-looking-busy
. One of the modules on my course this year is OO (Object-Oriented) Software Development, for which we're using Java. Now I'm not a huge fan of Java, but I can appreciate it has many uses, and I don't mind coding in it. The only issue is that, from the lectures, I don't actually have a fantastic understanding of OO Methods and such. So I got a book out of my Uni library - Java in Two Semesters - so far, it's actually really good, and I already have a better understanding of things
Now I just have to finish an assignment!
One final comment - I'll be changing my Planet Ubuntu feed in the coming week to include all posts from my blog, as I'd say that 99% of my posts relate to Ubuntu in some way
Finding iTunes Music
I wrote a program earlier, because I wanted to find out which songs in my iTunes library were bought from the iTunes Music Store.
Me being me (read: lazy) I didn't want to have to trawl through all 2041 songs I have in there, just to find the purchased ones.
So I wrote a program, and I'm hosting it on my googlepage
Mono (A Free C# Compiler)
I installed mono on my laptop earlier, and it installed a command prompt application to compile my C# programs.
The problem is; I use cygwin for my C compiling and ssh-ing into the University servers. SO obviously I wanted mono installed in cygwin.
Luckily I found a way to do it:
- Download the mono for windows installer
- Run the installer, and select your cygwin folder for the installation directory (in my case this was C:\cygwin)
- Install
- Open cygwin and type "mcs" without quotes, and if it's installed correctly it should spit back a load of rubbish about no files at you.
Hope this helped anybody who was struggling to do this.
C#
One of my modules at University is C Programming, which I have to say, I am quite enjoying, as I've always enjoyed programming.
However a friend of mine is starting doing C# (C Sharp), and asked if I'd do it, which I said I would.
So I might start learning that soon, just got to wait to see if we can have a proper lab session on it first. Though I might have a bash over the weekend, I'll probably download Visual C# Express Edition or something to try it out.
