Linux Format logo

Paul Hudson's Coding Academy

If you've received your copy of LXF128, you should by now have spotted that our new special edition magazine, Paul Hudson's Coding Academy, is now on sale - you can read more about it at www.linuxformat.com/codingacademy.

The problem is, it's selling a bit better than we had expected - we had 200 copies ready for sale online alongside the thousands destined for newsstands around the world, but all the online copies have already sold out. We're trying to get more for online sale by pulling copies back from newsstands, but it's not easy.

So, there are some things you need to know:

  • If you ordered one from us online, you will receive your copy. It says Sold Out now, but if you placed your order then you will get a copy even if I have to print one out myself and post it to you.
  • If you haven't ordered one online, it's very unlikely you'll be able to get one now, because they have all gone.
  • That means the only place left to get your copy is in your local store. They are in many stores across the UK, such as Asda or WHSmith. They are being shipped over to North America for sale in places like Barnes & Noble, Borders and Frys. In South Africa, try CNA or Exclusive Books. If you're in Norway, try Narvesen stores. Swedish folk should look in Pressbyrans. AKO stocks some if you're in the Netherlands. They are in many independent bookstores across Australia. In short, we've sent copies out around the world, so just ask in your local large book/magazine store. If stock hasn't arrived yet, you'd be smart to reserve a copy otherwise you're likely to miss it.

If you spot spare copies in your local store, please do let other folks know because chances are there are other people nearby who are struggling to find it. Or, if you're feeling crafty, buy them up and put them on eBay.

Thanks!


Your comments

I would never have purchased

I would never have purchased this special edition if I had known that it was an advert for Mono, and had no useful information in it for anyone who was not interested in Mono.

It is a real shame that there was no mention of Mono (or the absence of material about any other languages) on the exterior packaging.

Exactly

That's exactly why I didn't get it.

Err, did you not check the online edition before??

Seems a bit of a rendundant comment to say you would have never bought it because of mono. If you had read the online edition, then you would have known that it was based aroud mono and C#. I believe there was even a post stating that it was an updated version of the online stuff!!

Personally, I dont why you are objecting. The facts are that C# / mono is easy to learn and comes with a massive library which can be called on to do stuff. The Coding Academy is designed to get you from zero to programming in the fastest way possible, leaving all the theory as an exercise for the reader. That means not going for a language like C/C++ as you dont want to have to get into resource management.

So what are you left with? Basically, in my opionion, Java, C# or python. Python is being covered by Evil Nick, so thats out. So Java or C#, and given Paul likes C# its was always going to be that (if you didnt know that then you obviously haven't read Linux Format or listened to the podcast).

If you want to make a stand about how C# is the spawn of the devil, fine, but do it somewhere else where people give a ****. You won't change anything here by moaning about it.

@First poster

"It is a real shame that there was no mention of Mono on the exterior packaging."

Not Mono, but it tells you the language. On the back it says:

"Learn to program by making cool projects for Windows, Linux and Mac using C# and .NET"

Use Digital Tool to Solve the 'Producer-Consumer' Problem!

Why don't you guys at Linux Format make this book available in digital format, e.g. a PDF file? Perhaps you are worrying about the difficulty in preventing it from being copied freely?

I understand that you have to get enough profit to keep 'Linux Format' in good health, but please consider that at an appropriate time, putting a digital version of this book on sale. Then it'll never be sold out and someone like me, a subscriber of LXF living in China, can easily buy it. Maybe somewhen it can become free-for-download as well? Actually, I'll definitely buy a digital copy as soon as I see it available, regardless whether it'll later become free or not.

There is a electronic version available

at www.tuxradar.com

The Coding Academy is Great

Hi,

I bought Paul Hudson's Coding Academy at the weekend. I've done some programming before, having taught myself some JavaScript, PHP + MySQL and some BASIC. But I've always wanted something that would take me through core programming concepts in a logical and systematic way with fun, practical hands-on projects to get stuck straight into. So when I saw this special edition I thought, yes! this is exactly what I'm looking for - I want to develop games and I want to learn core programming procedures and to create applications that I can port from Linux (my preferred OS) to Windows and Mac. I also hope I can extend these coding projects to develop applications for the users of the Windows computers I manage at work.

Last night I completed Project One, and it didn't disappoint. One really cool thing I now understand is how to manipulate arrays using foreach loops - and I applied this today to one of my PHP projects at work. It was a cinch to apply this from C# to PHP - so instant success and thanks guys!! Also, Paul's narrative and instructions provide loads of tips on how to approach programming tasks - the logic of planning what needs to be done and choosing the programming steps to accomplish this.

I think it would be great to have a forum for people to discuss issues they encounter with parts of each project. I guess that's what this is for? Anyway, congratulations on a really brilliant publication. I'm now starting Project Two and can't wait to get it built from scratch!!

Python?

No, I don't want to join the "Mono is Evil" debate (and I understand why you didn't allow comments under the announcement of the Coding Academy), but I would still like to ask whether it is possible to do a similar issue about Python? I'm sure there are more people interested.
But in any case - keep up the good work!

Re: Forums

"I think it would be great to have a forum for people to discuss issues they encounter with parts of each project."

There are forums on this site -- click Forums at the top and go to Programming. There you can post questions related to the projects, or just share your progress. Have fun!

About that Java thing...

I don't want to get bogged down in the C# vs World debate, but from a purely practical viewpoint it would be nice to see a few articles on Java from LXF. After all, Java runs on even more devices than Linux these days (like my cheap 'phone for instance - there, I've declared my bias), while C# is, at best, playing catch-up.

How about a future special edition using a range of modern languages, showing the similarities and how to adapt from one to another?

Well I'm jealous!

Well I'm jealous! I placed my order on the first day Coding Academy came out and I'm still awaiting delivery. I now understand it should arrive within the next twenty days. (Thanks to Paul kicking the appropriate part of the Distribution arm of the Publishers.)

With just 200 copies being reserved for on-line sales, one might question the strategy employed by the Marketing Team as this appears, in retrospect, to be a woefully inadequate number. I'm surprised no one has considered a reprint run.

Perhaps Paul, you should be considering a book, expanded within the topic and having the published lifespan of longer than a Mayfly! ;¬)

Twenty days!

Publisher_of_LXF said yesterday (26 Jan):

"I'm told that 220 people have ordered the special. 184 of those have now been sent out, following a frankly inexplicable delay between the magazines being printed and being logged in the fulfilment house's computer system. A further 16 copies are being sent today."

Ray Woods has been told his magazine should arrive "within the next twenty days". If 200 copies have already been "sent out", can someone explain where they are going to be for the next twenty days?

I, like Ray Woods, also ordered my copy on the first day it was available and am still awaiting arrival. It is now four weeks exactly since I saw the advert for the publication in my subscriber copy of LXF128. I read Paul's revelation on 25th Jan that 200 copies only had been set aside for online sales with mounting incredulity. 2,000 would have been a more sensible number. Why does there always have to be a Mayfly lifespan? Why can't there be an opportunity for people to buy something like this over a number of months, even a year?

Some answers

Hey!

Thanks, everyone, for your feedback. Let me answer some of your comments:

<< It is a real shame that there was no mention of Mono >>

As someone else said, it's right there on the back.

<< Why don't you guys at Linux Format make this book available in digital format, e.g. a PDF file? Perhaps you are worrying about the difficulty in preventing it from being copied free >>

No, that's not the reason. As you're a subscriber, I hope you've visited our subscriber-only area (www.linuxformat.com/subsarea), because you can download PDFs of lots of back issues there. So, we have no problem with PDFs. The only real reason is that we're a magazine company set up to print and sell magazines*, so PDFs aren't something we can sell easily.

(* Yes, I realise this is somewhat ironic given the epic screw-up that has formed around distribution of this special.)

<< a similar issue about Python >>

Yes, that's absolutely possible. There are two options here: either I rewrite everything in Python, or do new projects in Python. I don't mind either way, but I think it's a great idea - we'll have to see how well this one sells.

<< it would be nice to see a few articles on Java from LXF. >>

We actually ran a long Java series years ago. We haven't picked it up since then because demand is very low.

<< After all, Java runs on even more devices than Linux these days (like my cheap 'phone for instance - there, I've declared my bias), while C# is, at best, playing catch-up. >>

It does run on lots of devices, but being on lots of devices doesn't make it a good tutorials topic in the same way that McDonalds selling a lot of burgers is in no way a sign of its culinary excellence. On the Linux desktop, there are very few popular Java apps.

<< How about a future special edition using a range of modern languages, showing the similarities and how to adapt from one to another? >>

No: this is something I'm dead set against. We could do a magazine about C#, or Python, or Java. That's all fine. But I'd prefer to avoid another special about more than one language, simply because I'm less interested in teach languages than I am in teaching How To Do Stuff. If you discuss three languages, you lose a lot of space explaining stuff that has already been explained, just slightly differently.

<< With just 200 copies being reserved for on-line sales, one might question the strategy employed by the Marketing Team as this appears, in retrospect, to be a woefully inadequate number. I'm surprised no one has considered a reprint run. >>

The thing is, it's very hard for us to predict how many magazines we'll sell for these specials, because each topic is very different. Some other specials are still available to buy online, because we ordered more than we sold!

<< Perhaps Paul, you should be considering a book, expanded within the topic and having the published lifespan of longer than a Mayfly! >>

This is a good idea; I'll pass it on.

<< Ray Woods has been told his magazine should arrive "within the next twenty days". If 200 copies have already been "sent out", can someone explain where they are going to be for the next twenty days? >>

I don't know where Ray got the figure of 20 days from. We have been flat-out promised by the warehouse that the magazines have been posted; as far as I know, there is no reason they shouldn't already have arrived, so I'm confused and annoyed that they haven't.

<< I, like Ray Woods, also ordered my copy on the first day it was available and am still awaiting arrival. It is now four weeks exactly since I saw the advert for the publication in my subscriber copy of LXF128. I read Paul's revelation on 25th Jan that 200 copies only had been set aside for online sales with mounting incredulity. 2,000 would have been a more sensible number. >>

This probably sounds crazy to you, but honestly: 200 copies for online sale is quite a lot. Compared to newsstand sales, we sell very, very few magazines online. A month ago, it was considered very unlikely that we'd sell all those 200, and so it's a) great that we have, but b) really annoying that we have, because clearly there's much more demand than we can supply.

<< Why does there always have to be a Mayfly lifespan? Why can't there be an opportunity for people to buy something like this over a number of months, even a year? >>

Like I said above, we're a magazine company, set up to print and sell magazines - and, for the most part, that means newsstand sales. Few shops are willing to store a magazine for more than three months, which means the only way to keep this thing on sale would be to order a lot more then store them in a warehouse somewhere, hoping they sell. Now, they might sell, in which case great! Everyone wins. Or they might not, in which case we wait a year then throw 5,000 magazines + DVDs into landfill. Everyone loses.

There's not really a great deal more I can say. It annoys me very much that this huge mess has happened. It upsets me because some of our regular readers are really getting done in by these problems. And, of course, the fact that this special edition has my name attached to it makes it even more irritating when this kind of thing happens. I spent six months writing these projects, so it's very disappointing when things turn out like this!

I spent all day Monday calling people trying to find spare copies that we can send out so that everyone who ordered a copy online will get one, but that's pretty much the limit of what I can do beyond calling and harassing and kicking on behalf of people who email me. And if you do have any further concerns or if you want to make your complaints official, please do drop me an email and I will make sure the right people hear about it.

Not quite sure I understand

<Like I said above, we're a magazine company, set up to print and sell magazines - and, for the most part, that means newsstand sales.>

Not quite sure I understand this. Yes, magazines are sold on newsstands. But every magazine I ever buy seems desperate to get their readers to take out a subscription. "Never miss a copy, have it delivered direct to your door" and so on. Lower prices and free gifts are offered as incentives. As you know, I am an LXF subscriber (it is years since I bought a copy in a shop) and it seems that no sooner have I renewed my subscription than I receive an e-mail tempting me to renew for yet a further year after that at a very competitive price. So you all seem in the business of trying to divert people away from buying newsstand copies. And yet you are saying here that you are set up to sell magazines for the most part on the newsstands.

Anyway, very many thanks for all your efforts in trying to sort out this mess. We do appreciate it. I'll let you know when, and if, I receive my copy!!

Bad weather may have been a factor...

... in the volume of online orders. I'm a subscriber who can't just pop down to the shops for a magazine. The nearest newsagent that stocks LXF is 11 miles from me and there was heavy snow when the coding academy issue went on sale. Before I subscribed there wasn't even any guarantee that the newsagent would have a copy of the regular mag for sale that month either so I decided not to risk traveling to get a special edition that might not even be there and ordered online instead.

Still looking forward to getting mine

I've been working in various IT support roles for years but never quite made it to serious programming as my work is so general. I was really looking forward to this special as soon as I saw it and ordered it straight away and now rush home in the hope of it arriving, sad I know.

I have to agree that I don't think the mono only nature was made really clear initially or maybe I didn't spot it having seen the previous coding special which was more general, so I expected more of the same.

The point I wanted to make though was that I don't care, £10 for some quality tutorials written by someone I know really cares about the subject isn't much and I know any profit will help keep the mag afloat given it must be hard to get a lot of ad revenue from software that is generally given away. I did spot the mono info only when I went back to look at the details when trying to find out why my copy hadn't arrived.

I'm currently working though a great Ruby book recently given a thumbs up in LF and even though I'm not sure how much I'll use Ruby, I am finding it a great introduction to programming concepts which will transfer to any language and I'm hoping this special will be the same. I also have mixed feelings about Mono but I'm sure it won't do me any harm to learn some and I'm sure I'll have some fun along the way.

I just had to say something positive as I'm sure Paul Hudson has put a lot of work in to this project so it's a shame there's so much focus on the choice of language and lack of copies rather than the quality of the content.

Really Annoyed

I am very unlikely to buy 1 off magazines through this website again. I received my subscription copy of LXF 128 December 30th, whooh did I feel good - straight on to web site to order coding academy - down hill from then on. The web pages didn't even acknowledge availability - then a page saying we could order on the 6th - ordered on the 6th waited - saw it in store Friday 15th - emailed customer services (sic) Monday very slow to reply saying that my order had been processed and would be with me shortly. not arrived 28th - rubbish service.

I also ordered 'Switch to MAC' on 9th (7-10 days) Arrived 26th and I'm still waiting for customer services to reply to my email on day 12.

Based on the quality of LXF, I was considering subscribing to MACFormat - guess what - I'm checking out the alternatives.

Just arrived!

<<Anyway, very many thanks for all your efforts in trying to sort out this mess. We do appreciate it. I'll let you know when, and if, I receive my copy!!>>

Postman has just delivered it!

Mine has come too!

Thank you to Paul and all your efforts as my copy of Coding Academy arrived a few minutes ago. And now down to some serious reading.

Coding Academy

Hi Paul

Still waiting to receive my copy of the Coding Academy too, I have been charged by LXF after ordering online but no magazine yet.
Who do I give my details too in order for you to check where my copy is?

Thanks

Rob

@Robert Brown

It looks like copies are (finally!) arriving. if yours hasn't arrived by Monday morning, drop an email to paul.hudson@futurenet.com with your address and the date you ordered.

Slow delivery and Mono-centric.

My copy arrived today, which was a bit unusually slow for Future, normally I get it before it's out on the shelves (the normal magazines) but I'm not too fussed, it's here.

I did expect Mono to figure prominently but perhaps not _all_ examples, after a quick flick through. I'm just stating my preference that I'd prefer a focus on other languages, like C or Python, shell scripting even.

I understand why you use Mono as it with little code you can get great, visible rewards. Neither am I ideologically against Mono, although it doesn't help. I simply have no want or inclination to learn it. Every program that I've used written in it is bloated and slow, like Java. It reminds me too much of my programming classes in Delphi for, good reason, even though Mono is superior.

Just for future reference next time I'm not going to buy the special if it's _all_ about Mono, I don't mind some. I thought you had a better balance in the last programming issue, but there appear to be better tasks in this one.

Thanks.

A follow up

Just to follow up on my previous comment, as I've now read the comment thread fully and see Paul's replied.

It doesn't seem like your last programming special's approach of a multitude of languages was favoured by you, for good reasons. As I've said above, these tutorials in their results appear far superior and I do applaud your work. C# is just not the language I really want to learn, doesn't mean these won't be useful at some point or that I won't give them a try. I knew it would mainly be on C#, albeit not all, but I bought it anyway as I want you to keep making programming specials.

So thanks again for your efforts, what you've done certainly looks impressive and I echo a few other commenters' calls for maybe a focus on a different language in another special, Python being a good candidate.

Thanks again.

Thanks but NO thanks...

Somehow I missed the online edition of Coding Academy and was unaware of its commitment to C# and Mono, otherwise I wouldn't have purchased it. I have no wish to waste my time learning a language that could be the ultimate trojan horse as far as Linux is concerned.

http://www.fsf.org/news/dont-depend-on-mono/view?searchterm=mono

I'm disappointed because I had high hopes of a programming course that implemented Python or C/C++. Could it be made clear next time as to which language is being used? ie. 'Coding Academy in C#' etc...

Re: Thanks but NO thank...

I don't get Blarney's objection. Sure, there's an argument against Mono-ifying everything on the Linux desktop. But this is a separate topic: this is about learning to program. In my experience the language is a side issue - the skills you learn (solving problems, algorithms, modularity, good coding practice) apply across all high level languages. C# is a good language for beginners so it makes sense to use it - that's a separate matter from the politics of the Linux desktop......

Awesome!!

Thanks so much!

Language a side Issue?

JackN: You're right that skills learned in one language can be used in any other. But, why waste time with a language that potentially could be attacked by Microsoft in a patent claim? Why learn the syntax when others could claim better credentials and be safe from the Redmond giant?

I wonder at the choice of language considering the inevitable backlash from those Linux users that do understand the principles at stake.

Foreword

I've just read the Forward, by Miguel de Icaza, and hardly understood a word of it! The terminology, to me, rather assumed a much deeper knowledge of the subject than I currently have and could have put off lesser mortals, had they been able to browse the contents at the newspaper stand.

This for me is has been the major bugbear of Linux to the great unwashed; you need to understand it before you can read about it and understand it!

I just hope I can understand the forward once I've read the whole tutorial. So, I just keep reading, reading reading...

;¬}

Patents, forewords, etc

Hey!

It's great that there's so much discussion taking place in a friendly and reasoning way. Blarney, you seem very concerned that Mono is going to be attacked by Microsoft, which I just don't understand. When I printed a letter in LXF about Mono, I made it clear that I was getting sick of the straw man arguments from the anti-Microsoft community, and in turn someone wrote a blog post saying - amongst other things - this:

"As for why people object to Mono, the reason is not just because it’s based on something originally developed by “Micro$haft”. The reason is that there have been concerns about “submarine patents”, in other words, hidden, patented technologies which Microsoft could use later to destabilise the Linux platform by making patent claims against important Linux applications."

I posted a comment to his blog in response to this, but never got a reply. As it seems to cover some of the same points that have been raised here, I'm reprinting it un-edited:

==
1) Microsoft has said that its Community Promise covers all the parts of Mono that we care about. Of course, this is by no means water-tight - as Bradley Kuhn from the SFLC pointed out to me when I talked to him last, IF Microsoft sells .NET outright to another company and IF that company chooses to sue Mono and IF there are indeed patents that are infringed, the Community Promise won’t help Mono.

That is absolutely true, but each time Microsoft takes another step towards freedom (such as when it released the .NET Micro Framework under the Apache licence, which includes permanent, worldwide patent indemnification), doubters just find ways to add more “IF”s to the conditions and thus keep the fear alive. So: I don’t think all those ifs are likely, and thus Ithink the Community Promise is sound, but I understand why others ignore it.

2) Can’t other things have patents too? Microsoft has flat out stated that Linux infringes patents, but no one is saying we should switch to BSD. Microsoft has contributed huge resources to help the PHP developers, but no one is saying we should switch away. To be blunt, Adobe owns (and has successfully sued for) patents involving tabs in applications, so I think it’s very likely that PHP, Perl, Apache, Linux and who knows what else also violates these so-called “submarine patents”.

When you get right down to it, Mono/C# isn’t exactly much different from PHP: it’s a C-based language with garbage collection that gets compiled to byte code then executed, and it has stacks of helper functions. Why is Mono any different to PHP if, as you say, “the reason is not just because it’s based on something originally developed by “Micro$haft””?

3) The very concept of “submarine patents” is fundamentally flawed. Let me flip it around for you: Steve Ballmer and other Microsoft employees have repeated stated that Linux infringes Microsoft patents. What are these patents? Who knows - they won’t say. So the Linux community laughs and carries on as usual, just as it did with SCO’s legal threats.

And yet here we have the same thing: people are saying that Mono might infringe patents, but they don’t say which patents. They just threaten from afar. They say that Mono may one day be threatened with patents, and so should be avoided - despite the fact that Linux itself has already been threatened with patents and continues to be threatened with patents.

So: while I think it’s great that you’re taking a stand for what you can believe in, I hope you can understand why I just don’t find the patent threat credible at this time.
==

I still feel the same way: C# is light-years ahead of the competition. I'm quite comfortable with Python (see my PyGame library for an example: http://www.tuxradar.com/gloss), Objective C (see my iPhone app, Brain Party), PHP (see my free online book, http://www.tuxradar.com/practicalphp) and many other languages. I don't use C# because I'm just flat out clueless about programming or because I don't understand the so-called risks. I use it because it's technically the finest programming solution around right now.

But you're welcome to disagree.

Now, onto some of the other comments...

<< Every program that I've used written in it is bloated and slow, like Java. >>

In the nicest possible way - and there really isn't a nice way to say this! - I find that a bit hard to believe. Let me explain why:

1) C# was designed to be compiled to machine code, unlike Java which had it added later and so suffers. Mono's performance is admirable given what it's doing. Sure, it's not going to be as fast as C, but it's guaranteed to work on a platform (no more "libxml2.so.1 missing" nonsense), contains far more functionality than C (which means you get to use C#'s highly optimised libraries rather than coding your own in C), and you also don't have to worry about memory management and the like.

Don't underestimate this power. Microsoft has - for better or worse - given its developers the freedom to blog about what they do, and a few years ago there was an excellent series of blog posts from two developers: Raymond Chen and Rico Mariani. Chen is working on a simple dictionary program in C++, and, for fun, Mariani produces the same thing in C#. Mariani's analysis is really good - he writes a "dumb" C# port (ie, no attempt to optimise it), and he also breaks down where the C++ app is having problems and what Chen is likely to do to fix it all. (read more: http://blogs.msdn.com/ricom/archive/2005/05/10/performance-quiz-6-chinese-english-dictionary-reader.aspx)

Here's a rough summary:

Version: Execution time
C++ v1: 1.328 seconds
C++ v2: 0.828 seconds
C# v1: 0.124 seconds
C++ v3: 0.343 seconds
C++ v4: 0.187 seconds
C++ v5: 0.124 seconds
C# v2: 0.093 seconds
C++ v6: 0.062 seconds

So: the end result - a very public (with posted source code) blog fun-fight between two highly skilled developers results in C++ pulling ahead of C#. This isn't a surprise; C++ is very fast. But there are two important things here:

a) To get that speed, Chen has to do a lot of work. As Mariani puts it, "Raymond starts using some pretty hefty Win32 magic" - he had to write his own file I/O code, his own string class, and even had to write his own memory allocation system. That's far, far more than most people would want to do.

b) The first-attempt C# code was as fast as the fifth-attempt from the seasoned C++ hacker after extensive code profiling and optimisation, and those numbers include the time it takes to load the .NET runtime in the first place - that's a fixed cost. The reason for this is that the .NET/Mono runtime is already very highly optimised, which means you don't need to write your own code to do stuff because great libraries are already there to use. I would also bet that the C# code took a great deal less time to write, because it's so much simpler. Memory management is no longer an issue - it just works.

Anyway, that's only point 1) of why, with all due respect, I think C# really can't be quite as bad as you say. Let's continue:

2) There are many more optimisations being made to make C# even faster. Did you know, for example, that Stephane Delcroix recently did some work on F-Spot (a C# app) to see whether he could make the gdk_pixbuf code any faster? GDK is a very mature C library, as I'm sure you're aware, yet he turned code that took gdk_pixbuf 431ms to execute in C into code that took 66ms to execute in C# - that's about 6.5 times read faster. (more: http://blog.reblochon.org/2010/01/talk-teaser-image-processing-with.html). I'm sure that if the GDK team had the time/manpower they would happily write the same code in C, but Mono makes it really easy to draw on the necessary newer CPU instructions and so get such improved performance.

3) A lot of the time, you're calling libraries - libxml, Gtk, WebKit, Gstreamer, SDL, OpenGL; these run at the same speed no matter what you're using. This is why games written in Python + OpenGL can still perform incredibly well - most of the time is spent doing GL stuff rather than getting stuck in the Python interpreter.

<< these tutorials in their results appear far superior and I do applaud your work. >>

I'm glad you like them. Like I said, I really feel much of their usefulness comes from the fact that the language is really secondary to What Can Be Done. I want people to make things, and have fun making them. I want them to feel they have the power to create more things on their own. Mono, for me, means I can say "let's load some XML..." or "let's create a GUI..." without saying, "do you have pygtk-2.0 installed?"

<< I bought it anyway as I want you to keep making programming specials. >>

Thank you - that's very kind!

<< In my experience the language is a side issue - the skills you learn (solving problems, algorithms, modularity, good coding practice) apply across all high level languages. >>

Yes, I really feel the same way. I hated many of the computing lessons I had at school - I, for some reason, just didn't see what importance stacks or linked lists had in Real Computing. Things are (fortunately!) a little clearer now, and you're right: once you learn how a List works in C#, you won't get worried when you see a Vector in Java. I taught someone PHP about a decade ago, and the following year he said he was really grateful because it made learning C++ so much easier.

<< I've just read the Forward, by Miguel de Icaza, and hardly understood a word of it! >>

You're right! I was really glad that Miguel was able to write a foreword, but I have to admit it's a bit scary :)

Trust me: the rest of the magazine is much more simple. Miguel is an incredible coder, which isn't surprising given all the work he's put into starting projects like Gnome or Gnumeric. But he does work on a bit of a higher plane than some of us - he loves to jump onto the very latest technologies and play around with them, whereas people buying the Coding Academy are perhaps a bit more interesting in solving problems and gaining a little more control over their PC :)

Apologies for the epic rant. I started typing this about an hour ago, and now it's quite late.

Well put!

As the title says. Well put.

MONO

Hudzilla:

So, your belief is that Microsoft has no ulterior motive in allowing us to use their intellectual property and that we should simply use C# because its technically a very good language.

Microsoft has other reasons for wanting support for .NET under Linux. They might not be able to destroy free software, but they would like to control it. Steve Ballmer himself said:-

“I would love to see all open source innovation happen on top of Windows.”

And its not as if Microsoft haven't used the patent threat before. Only recently they attacked the satnav company TomTom over their use of VFAT. By using MONO, the free software version of .NET Microsoft gains an advantage by getting people to use a proprietary programming environment that they control. Then, when the time is right, you can guarantee they will come knocking to collect royalties and sue those who refuse. If more projects are developed using MONO and become an integral part of all Linux distributions then there will be chaos if and when the axe falls. Free software would survive but a lot of smaller distros would disappear.

I've used Microsoft software since MSDOS 3.3 and seen how they work over many years. I don't trust them and simply don't understand why we should use MONO and C# when there are plenty of other alternatives and I find it interesting that Redhat doesn't include MONO by default. What do they know?

@Blarney

<< “I would love to see all open source innovation happen on top of Windows.” >>

I have no problem with that statement. I'm sure Apple would love to see all open source innovation happen on OS X. I'm sure Red Hat would love to see all open source innovation happen on Fedora. Why would Steve Ballmer actively want innovation to happen on another platform?

<< And its not as if Microsoft haven't used the patent threat before. Only recently they attacked the satnav company TomTom over their use of VFAT. >>

No, let's be clear about this: of the eight reasons TomTom was sued, three were because of its use of Linux. Microsoft asserted - and won - that Linux's use of VFAT violated its patent. Linux was at fault, and TomTom lost. To be clear: the court ruled that Microsoft's patent was valid in the US, which meant until that date the Linux kernel was definitely infringing. I don't want to get into a debate about whether the patent is valid or not, particular as LXF is based in Europe were software parents aren't supposed to exist; the simple fact is that a court ruled that it was valid and TomTom lost.

The Linux response was to remove the offending code (see http://www.desktoplinux.com/news/NS4980952387.html). Does it work around the patent? Probably, but we can't be sure. But we do know that Microsoft files around 2000 patents every year - almost 10 for every working day - and has publicly stated that it has multiple patents on technologies used in Linux.

<< Microsoft gains an advantage by getting people to use a proprietary programming environment that they control. >>

In what way does Microsoft control Mono? How is Mono proprietary? It's built on open, documented standards.

<< Then, when the time is right, you can guarantee they will come knocking to collect royalties and sue those who refuse. >>

Microsoft worked with both ECMA and ISO to make .NET and C# a standard. A basic requirement of that - as laid down by ECMA and ISO - is that all the standards must be available under RAND terms, but Microsoft went further and stated that everything was royalty-free. They can't charge royalties even if they wanted to.

<< If more projects are developed using MONO and become an integral part of all Linux distributions then there will be chaos if and when the axe falls. >>

Why? Why can Linux be patched but Mono can't? Why is it that Vala is OK to use despite being almost 100% syntactically the same as C#? Tell me - with no more futzing around with FUD - exactly which parts of F-Spot Microsoft will sue over.

<< Free software would survive but a lot of smaller distros would disappear. >>

This is nonsense. Which small distros would disappear, and why? Your premise here is increasingly ridiculous:

1) If Microsoft holds valid patents on and only on Mono (and not PHP, Perl, Python, Ruby, Java, etc, all of which are more widespread and thus would cause far more chaos)

and

2) If Microsoft chooses to sue over those patents despite its RAND licensing, royalty-free nature, ISO and ECMA standardisation, the community promise and Apache-licensed sections

and

3) If the Mono developers are absolutely unable to work around those problems

and

4) If Mono is somehow so deeply tied into distros that they simply can't remove it

Then yes, there's a problem. But the combination of all those happening is freakishly unlikely. There's nothing about Mono that makes it impossible to remove, or rewrite.

<< I've used Microsoft software... I don't trust them >>

I think this is the core of the problem, and - honestly - I think you should just come out and say it. Stop with the submarine patents nonsense. I think you don't like C# because Microsoft invented it. It was Not Invented Here, therefore we don't want it.

<< and simply don't understand why we should use MONO and C# >>

Because it's the superior choice. Why do you think F-Spot rose to the top above all the other picture tools? Why has Gnome Do gone from zero to awesome in hardly any time? Why did Beagle lead the charge towards real desktop search? Why was Tomboy so good that suddenly almost every Gnome desktop shipped with it, a trend that has only changed when someone took the time to rewrite the whole thing in C? Why is MonoDevelop so good that it kicks dirt in Anjuta's face? I mean, have you ever *tried* one of the Python IDEs?

I've asked a lot of questions here, and I hope you'll reply with specific answers.

PS

If you're going to copy and paste from Roy Schestowitz, at least credit him for his work.

Thanks Paul for the

Thanks Paul for the explanation. I'll be waiting for your next coding specials!

Informative

Wonderful addition to your previous ones.

@Hudzilla

<< “I would love to see all open source innovation happen on top of Windows.”
I have no problem with that statement. I'm sure Apple would love to see all open source innovation happen on OS X. I'm sure Red Hat would love to see all open source innovation happen on Fedora. Why would Steve Ballmer actively want innovation to happen on another platform? >>

Nice spin. Of course, all these companies want to see innovation happen on their own platforms. The words missing in your last sentence are 'open source'. Ballmer is well documented as despising the rock that Linux is built on. The famous "Linux is a cancer" quote is but one of his many attacks. Do you seriously believe the CEO of Microsoft has changed his viewpoint around to loving the GPL. http://www.theregister.co.uk/2001/06/02/ballmer_linux_is_a_cancer/

<< And its not as if Microsoft haven't used the patent threat before. Only recently they attacked the satnav company TomTom over their use of VFAT.
The Linux response was to remove the offending code (see http://www.desktoplinux.com/news/NS4980952387.html). Does it work around the patent? Probably, but we can't be sure. But we do know that Microsoft files around 2000 patents every year - almost 10 for every working day - and has publicly stated that it has multiple patents on technologies used in Linux.>>

...and this is supposed to reassure me how?

<<In what way does Microsoft control Mono? How is Mono proprietary? It's built on open, documented standards.>>

Mono is an open source copy of .NET

Microsoft controls .NET thus it controls Mono. Mono will always be trying to keep up with latest version and because of this will always be seen as second best to the 'real thing'. It may be multi-platform but to get the best experience you might as well be running windows.

<< I've used Microsoft software... I don't trust them
I think this is the core of the problem, and - honestly - I think you should just come out and say it. Stop with the submarine patents nonsense. I think you don't like C# because Microsoft invented it. It was Not Invented Here, therefore we don't want it.>>

I'm no fan of Microsoft thats true. Thats why I use Linux exclusively. I don't care who invented C# or indeed, how wonderful it is. If theres any chance its going to become a nuisance to free software then I want nothing to do with it.

I can see from the 'Coding Academy' special edition that you know your stuff and have put a lot of work into its creation. I shall, however, wait for the Python version (Partly because I've already started learning that).

One thing is for sure. There is a big demand for programming courses and that can only be good for the future of Linux.

@Blarney

<< Nice spin. Of course, all these companies want to see innovation happen on their own platforms. The words missing in your last sentence are 'open source'. Ballmer is well documented as despising the rock that Linux is built on. The famous "Linux is a cancer" quote is but one of his many attacks. Do you seriously believe the CEO of Microsoft has changed his viewpoint around to loving the GPL. >>

The problem here is that you seem to think one must either love the GPL or hate the GPL. No, I don't think Steve Ballmer loves the GPL. In fact, I think he'd rather the GPL didn't exist. But I do think - and his original quote from you seems to verify - that, as the GPL *does* exist, he'd at least people were using it on Windows. And that makes absolute sense, like I said.

To give you an example, check out http://php.iis.net - that Microsoft's official "run PHP on our IIS web server" web page. They talk about how to make PHP awesome on Windows. They tell you how to install and use WordPress, Drupal and Joomla - all open source software. I'm sure they'd rather open source software didn't exist, but their stance is pragmatic: it *does* exist, so we might as well work flat-out to encourage you to use it on Windows.

<< ...and this is supposed to reassure me how? >>

I'm not trying to re-assure you. I'm just trying to make it clear that while Microsoft *might* think that Mono infringes on some patents, they *definitely* think that Linux infringes on patents. But that doesn't seem to matter to you.

<< Microsoft controls .NET thus it controls Mono. Mono will always be trying to keep up with latest version and because of this will always be seen as second best to the 'real thing'. It may be multi-platform but to get the best experience you might as well be running windows. >>

I am both amazed and saddened by your ability to drop your earlier straw man argument and replace it with this other straw man argument.

Earlier here I quoted from a comment I posted elsewhere. In that instance, someone else posted the argument you made about submarine patents. Cunningly - as if there's a worldwide broken record of Mono trolls - he also said what you just said, that Mono is always going to be chasing .NET. Again, I will quote unedited from my response to him:

==
This is a very common strawman argument, and I just don’t understand why it crops up so often.

Listen: Microsoft has released .NET 1.0, 1.1, 2.0, 3.0 and 3.5, with 4.0 due out sooner or later. They have an incredibly fast pace of development, largely thanks to their large development resources. And I absolutely agree that if Mono’s goal was to tail Microsoft, then MS would indeed always be one step ahead.

But please think about what you’re saying. For all the years Mono has been around, how many Windows apps have been made to run on Linux using Mono? Hardly any. In fact, I doubt most people could name even one. Isn’t that a bit strange if the Mono guys are trying to re-implement the whole .NET stack on Linux?

Instead, what we find are apps like F-Spot, like Gnome Do, like Docky, like Tomboy, like MonoDevelop, or like Banshee. These are all written using Mono, and these are all written for Linux. Sure, thanks to Mono working on other platforms it means that MonoDevelop now runs on Mac and Windows, but these are all desktop Linux apps. Microsoft can release .NET 5.0 tomorrow, .NET 6.0 next week and .NET 10.0 the week after, and it wouldn’t matter - those apps work perfectly fine right now, and will carry on working perfectly fine even if Mono never adds any new features from .NET.

You see, when you said “Linux has its own technologies both for network and desktop development”, you really hit the nail on the head: Linux has wonderful technologies like SDL, like Gstreamer, like D-Bus and more, and Mono has support for all those and more. It doesn’t matter what Microsoft comes up with in the future, because Microsoft compatibility isn’t a goal. The Mono site states clearly that the goal is to “lower the barriers to producing great applications for Linux”, and I think it’s doing just that.
==

Again, I still stand by that.

<< I'm no fan of Microsoft thats true. Thats why I use Linux exclusively. I don't care who invented C# or indeed, how wonderful it is. If theres any chance its going to become a nuisance to free software then I want nothing to do with it. >>

Then I suggest you ditch Linux and switch to BSD. Or Hurd. Or MikeOS. Did you know that Microsoft holds a number of patents that cover technology used in OpenGL? That's used in lots of places in the modern Linux desktop. Previously people have said (http://eupat.ffii.org/pikta/xrani/opengl/index.en.html) that it was going to cause a meltdown for Linux, but it never happened. It still could happen, and Microsoft has publicly stated that it will charge for their use (http://news.zdnet.co.uk/software/0,1000000121,2118968,00.htm), but still no one seems to care. Again, this is an instance of Microsoft a) admitting they have patents covering something we use, and b) admitting they will enforce them aggressively, but c) you not caring.

Or there's OpenOffice.org. Microsoft has said publicly that there are at least 45 MS-owned patents being used in OOo (http://www.tgdaily.com/business-and-law-features/32016-microsoft-blasts-open-source-software-clones-for-patent-infringement), but still we carry on using it.

So: we have the number one office suite, the number one graphics system, and let's not forget the 100 or so patents Microsoft claims against the Linux kernel itself.

And yet, the *only* place where Microsoft has promised not to sue over its patents - that's Mono, folks - is the one you don't like. I hope you can understand why I find that point of view indefensible.

I would like to purchase

Well, I can't find a copy anywhere! Must send wife further afield in my quest. (she likes shopping).

Re: I would like to purchase

Copies are selling out pretty much everywhere, so, yes, you may need to try a little harder than normal to find one. Sorry!

Congratulations

Thanks Paul for the excellent tutorials - it's nice to see such professional documents and you should be congratulated for that.

I am very pleased that you decided to pick Mono - I've been meaning to learn up on C# for some time now, and this has been a pain-free introduction. Also, your remarks about Mono/Microsoft are completely correct and it's refreshing to have someone a) doing something and b) not following the awfully negative 'I think there could be a problem with this (one that doesn't exist now) in the future' approach. There are too many politicians already using that spurious approach.

I am a professional 'C' developer (although I seem to have spent most of my life creating companies) and I can tell you that software production has been in decline since Microsoft produced MSDOS ('C' was created well before that). I have previously designed and written an operating system that ran on a 48K machine and loaded with 6 revolutions of a floppy disk (6 secs) on a 1MHz processor and it ran a complete accounting system at respectable speed. It was written in (get this) interpreted high-level assembler with single step debugging. So you can imagine my disappointment with object-oriented languages upping the usage bar by requiring 5000 times as much memory and 2000 times as much processor and taking six seconds to load (firefox). I have also written a commercial system with 5000 screens and 400 data tables that can be distributed on a 1.4MB medium (although that shot up when we started using the xml libraries) and runs instantaneously, so I am horrified at present day inefficient software.

So I am very pleased to say that, finally, we may have a language that has the benefits of interpretation and compilation and is succinct to program in, hiding the complexities of some of the most obtuse systems I have ever seen. C# seems to be an elegant language that can even be used to good effect by systems programmers. My company had to spend three years producing some of theses libraries in Java so I can tell you that Java comes nowhere close to matching C# (or, more accurately, the libraries) in terms of production speed.

However, I have one question. I am very interested in the overload opportunities but am horrified to read in the C# 2005 book (Wrox) that you can't overload the '='. This appears mind-bogglingly stupid so I hope I'm wrong - can you comment on this?

A typical scenario is to have a data dictionary system that contains much more information about fields (SQL is badly deficient in this area). So I have a 'C' structure to represent each field in a row and a structure that is a list of field pointers in the table. These can all be created on the fly. A dictionary table might be called EMPLOYEE and a field might be called NAME. So EMPLOYEE.NAME is a structure pointer and the structure will contains lots of information (like validations) and a pointer to the actual field in memory.

So I would like to say: EMPLOYEE.NAME="Joe", or EMPLOYEE.NAME=TEMP.NAME, or whatever. So why can I have '+=' (which is allowed) but not '='. This appears to destroy the whole potential. Do you know the solution to this?

Many thanks again for your excellent work and also for your well-balanced approach to idiotic comments both here and in Linux Format generally. It's a pleasure to see such professionalism.

Overloading assignment

Hey!

I'm glad you like the magazine, but I'm sorry to say that you're right: you can't overload the assignment operator. That said, usually it isn't necessary - you're using a struct, and C# will by default perform a simple bit-wise copy when you use =.

As you're working with pointers, you should also mark your code as unsafe, and use the -unsafe compile operation.

Everyone's use is different, so it's not easy for me to provide an example that will be much help to you. However, this demonstrates a) how to store external resources with unsafe code and pointers if you really need it, b) how to call C-based functions if you simply cannot accomplish what you want in C#, and c) how the deep copy works. I very rarely use unsafe code - in fact, I think this might be the first time!

==
using System;
using System.Runtime.InteropServices;

namespace CopyTest
{
unsafe struct Meh {
public int ID;
public string Name;
public int* MyResource;
}

class MainClass
{
[DllImport ("libc.so.6")]
public static extern int getpid();

unsafe public static void Main (string[] args)
{
Meh foo;
foo.ID = getpid();
foo.Name = "Bob";
foo.MyResource = null; // do some pointer-y stuff here

Meh bar = foo;
Console.WriteLine(bar.ID);
}
}
}
==

(NB: if you want to store an unsafe type, eg char*, inside the Main class, you will need to mark that as unsafe too)

I know it's not ideal, but you can always just write a custom Clone() method that does the exact copying you want. As you're working with Actual Memory this seems like a smart move, because C# won't be able to manage that memory for you - you know exactly what must be retained, what must be copied, what can be pointed to, etc. And, while foo = bar.Clone() isn't as nice as plain old foo = bar, it's not too much of a chore :)

No more online copies!!?!!?

WTF! Are you POMs so broke-assed that they can't produce but a few copies! Don't they know (perhaps from the LXF subscription records) that there are a lot of us out here who "might" also like copies of the on-line version (Mono-centric or not)???

C'mon guys, don't let Brit Labour keep you down, mates!!!!

A disappointed Aussie Penguin (and we're closer to them than you are!)

Re: No more online copies

We've sent many copies out to Australia - please do ask at your local LXF outlet.

What about South African Stands

I wish the management will consider the South African Market in the near future. Also, please include other programming languages. Surely, it won't assist me to complain here but I believe that you will consider my suggestion. I enjoy your magazine since i started buying them last year. I had seen progress in terms of using and understanding Linux. I wish We can have a copy of the Linux Format special on stands

Re: South Africa

Like I said in the blog post, please ask at your local CNA or Exclusive Books - we've sent copies of this magazine out to both those stores.

Barnes & Noble, Borders : Santa Monica, CA. USA

Just checked Barnes & Noble and Borders in Santa Monica, CA. USA and no copies yet. Still on the boat ?

Sold Out

Shame, shame, shame. Looked at all the regular retailers and not seen sight of one. I'd have thought ones in shops would be in much shorter supply than online but then what do I know about how to run a magazine to make sufficient profit to still be there the next month. Nevertheless I'll keep looking, shops and online, in probably vain hope.

By the way, I find Head First C# by Stellman & Greene (O'Reilly) is good intro to C# but is based on M....soft stuff.

I bought it, but...

I bought this in a certain high street shop and read it. Well, this is definitely not for complete beginners (as am I) as I found it very confusing. You know the swimming pool metaphor, well this wasn't quite the deep end, but jumping into the murky river without a life jacket, but how to build a motor boat without the parts included. Still very confused, but the disc worked well.

Found & Suggestion

It has arrived at Borders El Cajon, CA, USA.
I enjoy the Special Editions even if all doesn't apply to me, I always learn something, they are always well written as is LXF.
Why not offer a 4 or 6 issue subscription so us diehards can always be sure to get one. I realize that the Special Editions are not published on a regular schedule, this doesn't mater to me.

Romania

Hi, Did any copies get sent to Romania. I got my sister in law to go out in the UK but because my copy of LXF comes so late the shop she went to said they had had them but no more. Having said that, I would not know which shops to go looking for a copy anyway.



Web hosting by UKFast