Posts Tagged Development
Running with Sharp Objects
Posted by Ben in Developer Tools, General Thoughts, Microsoft, New Technologies, Old Technology on August 25, 2010
On Monday, I wrote a post about moving from languages like C++ to the more modern C# and the .NET framework. Great if you’re using an older programming language – but what if you’re using a language like Objective-C or Java? These languages (even Java, the oldest of the three) fit into that ‘modern’ category, and will be familiar to anyone developing for the various other mobile platforms out there.
I’ve talked to a number of students recently who are either developing or have the ideas for some really amazing mobile applications, and there’s always a discussion around what mobile OS they are thinking of writing it for. But what if you wanna catch ‘em all and write mobile apps across all of the major mobile platforms? Well, life’s actually pretty sweet. It’s a lot easier than you might think to start working with C#, and before you know it you’ll be writing Silverlight and XNA – a skill that’ll let you write awesome applications and games not just for Windows Phone – but for PC, Xbox, and the browser too!
Some of the Same Rules
If you’re used to programming in Java, then you’re used to the idea of a managed run-time environment with things like applets and JavaBean. You get something very similar with C# – the .NET runtime. This gives you a managed run-time environment called the ‘common language runtime’ (CLR) which forms the basis of writing ‘managed code’ to take advantage of the CLR’s cross-language integration and exception handling, great security, deployment support, and some great debugging and profiling services.
The great thing about the CLR (and the clue’s in the name here) is that it makes life really easy when you want to design components and applications whose objects interact across languages – making the code you write exceptionally powerful.
Hello, Examples
I’m a big fan of making comparisons (simples) so let’s take a look at what a simple, console style Hello World app would look across all three languages:
|
C# |
|
using System; class HelloApp { static void Main() { Console.WriteLine(”Hello C#!”); } } |
|
Java |
|
public class HelloWorld { public static void main(String[] args) { System.out.println(”Hello Java!”); } } |
|
Objective-C |
|
#import <stdio.h> int main( int argc, const char *argv[] ) { printf( “Hello Objective-C!\n” ); return 0; } |
You can tell I liked to play ‘spot the difference’ when I was little, can’t you? The first big one here is in the code organization: while both C# and Java have a class with one method, Objective-C just uses a method.
The second difference is in the details: in C#, the Main method must start with capital “M”, while in Java and Objective-C, it is not a requirement. The String[] argument for the Main method in C# is optional.
The third thing to note here is in the Main method’s return type: in C# (and Java), it returns void while in Objective-C it returns ‘int’. That’s an option in C# – you can have the Main method return an ‘int’ value if you wanted it to.
Baby Steps
While it’s really easy to start using C# alongside Java and Objective-C, there are some ‘gotchas’ – Java developers are likely to have a much faster start when looking at C#, down to the fact that both languages are object-oriented languages, both are strongly typed, and both have a garbage collector that manages memory.
Those used to writing code in Objective-C will find a few more differences, mostly down to the different approaches to code that the two languages take (like sending messages to objects in Objective-C rather than calling functions in C#). There are also some differences in memory management (Objective-C has no memory management mechanism), and the type system (.NET’s strong type system as opposed to pointers to loosely typed memory locations in Objective-C).
And Finally…
As always with these things, your experience may differ – but hopefully this post has given a bit of an overview of how you can quickly and easily start using C# and harnessing the power of Sliverlight, XNA and the ‘.NET framework without having to drop all of your existing practises and move into something entirely new.
I got a lot of the info for this article from the XNA Creators club, so head there to dive into things in a little more detail – and as always, if you’re a student looking to create amazing stuff, check out Dreamspark – the place to get our developer tools & software free of charge.
The Real IT Crowd…
When you say the word ‘geek’ to some people, they think of spots, hunchbacks, and an inability to find a date.
The notion of geeks being anti-social is one of those urban myths, sort of like when your Mother told you that the moon was made of meat, or that if you picked your nose your brains would fall out. Over the past two decades, ‘social geeks’ have regularly met up, discussed cool stuff, and braved the world beyond their screen in the interests of getting to know one another. This gave birth to one of the IT industry’s best kept secrets:
The ‘Geek’ Community
It’s not all socialising – there are user groups, presenter nights, think tanks and conferences – and if there’s one thing I’ve learned in the 12 months I’ve been involved in the tech community, it’s that a social geek is a more productive geek.
“Each time I attend a community event, whether it be a conference, presentation or just a few beers I never come away without learning something new.” said an enthused Dominic Green, a recent university graduate who joined Microsoft as a developer, Azure enthusiast and general boffin. “That’s one of the great things about the dev community – everyone involved in it is so passionate about software development, it creates an almost addictive atmosphere.”
It’s not just stalwart developers that benefit from the UK tech scene – Ben Hall, all round IT ninja and co-author of Testing ASP.NET Web Applications had this to say: “Being part of the community has opened my eyes with regard to writing amazing code and using different frameworks to their full advantage, allowing me to be a better informed developer and benefiting my team and others around me.”
Ben was keen to let us know it’s not all about writing code – “With the support of my peers within the community, I have been given the opportunity to speak at conferences and become a published author – something I never thought possible before joining my first user group”.
While the scale of the tech scene is a well-kept secret, many people seem to struggle with a more profound problem – how to get involved. The saying “it’s who you know” is thrown around a lot, and seems to put a lot of people off of the tech scene – I mean – what’s the point in trying to open a door if it’s locked from the inside?
Thankfully, the door is a lie.
When I first started getting involved in the UK tech scene, I knew very few people that were a part of it… but I decided to jump in at the deep end, and see how easy it was to keep afloat – and so I went along to an event… and people talked to me. People I didn’t know. People I got talking to. People I then met up with for coffee. And a drink or five.
“The developer community has exposed me to many technologies and concepts that I would not have experienced without the wide range of people, interests and experiences.” Dom said to me. “Being a part of the developer community has allowed me to build up a great network of contacts and friends.” – and he really hit the nail on the head with that – these people aren’t just contacts, some of them are now friends too.
So how can you get involved?
Go to an event, user group, geek night, tweetup or general geek themed shindig. There are always people there willing to be social and tell you what’s on their mind.- Don’t just listen – join in the conversation. Twitter is a great medium for that if you can’t make it to a physical event.
- Love the geek world, and it will love you. If you’re passionate about what you do – whether you’re a developer, an IT Pro or just a technology enthusiast – you’ll find like-minded people.
Check out the LondonDev Community calendar for geek events in London, other events in and around the south of England, and check out the GeekUp and other events if you’re based ‘up north’ or in Scotland.
There may be a local tweetup near you too – take a look around at the various events happening in the UK.
I’ll see you there!
Who said geeks don’t go out?
So having missed last week’s TechNet After Hours event in London (run by Alex Ball and her team) through food poisoning, I was really keen to get out to a tech event to let my inner geek stretch it’s legs. That’s why I’m here at work (well, in the same campus) on a Saturday with the likes of Dominic Green and a huge crowd of developers and IT pros from all over the UK at the seventh DeveloperDeveloperDeveloper Day.
While the event is held (and sponsored) by the company owned by it’s namesake, it’s not a Microsoft event and the speakers come from a huge range of different areas within the IT community. If the thought of knocking minds with some of the best and brightest developers and technologists in the industry doesn’t take your fancy, there’s always the free lunch and breakfast rolls, and more pairs of DDD socks than you could wear in a month.
There’s been a huge array of sessions here do far today, from deep dives into WCF web services to much broader overviews of how to listen to a user’s requirements (which involved us all being asked to describe our underpants…), there’s been something for everyone.
Even further proving that geeks have a social life, the event comes complete with it’s own ‘geek dinner’ this evening – a great chance to network and let your hair down with other techies. So, reviews of specific sessions to follow - but in the mean time, if you’re at all into technology, I strongly suggest you check out some of the community links below.
The Windows that Never Was…
Posted by Ben in General Thoughts, Old Technology, Upcoming / Beta on February 25, 2008
One in three projects fail. There are literally hundreds of bits of software that never ended up seeing the light of day because of project cancellations, budget cuts… you name it. I’ve always found it fascinating that even in a large company like Microsoft, projects have fallen by the wayside a fair few times.

One such project is Neptune. Only available into it’s beta phase before being scrapped, Windows Codename Neptune is the missing bridge between the 9x and XP way of doing things.I managed to get Neptune build 5111 on CD. It’s one of the later builds before the project was scrapped, and I was really curious to see what it looked like and what it contained. Putting the CD in gives me quite a fun error message:
Apparently Neptune is better than XP x64 that’s running on this test box! I must have missed that memo… And look – Neptune boasts reliability, speed, security… all sounds very XP! Anyway, I fired up virtual machine and started up the install process from scratch.
This installer feels really Windows 95. I remember doing my first ever Windows 95 install and thinking “Wow, this all looks so cool” and yet 12 years on it feels a little jaded. It’s not quite Aero
Still, the install process didn’t take long at all, and I’m greeted with what looks like a fully loaded and ready to go desktop. But wait! What’s this? My first glimmer of a feature that later made it into XP…
Creating a user right off the bat? Sure, in XP its built in to the nice blueandgreen welcome screen, and I can add more than one user at that stage… but this is definitely something new. Notice the little “Comments?” link in the title bar? That appears in every window – great way to get feedback on bugs as and when they’re happening! Time to start exploring…
Microsoft Neptune! The start menu at this stage is still the same as ever it seems – this one is lifted right from Win2K. I guess the focus didn’t shift to cosmetics until development of XP got fully underway. Still, this seems all very stable so far – no BSOD from clicking start, which is something my Beta of Windows ME never quite managed… So, I figured I’d poke around and look for any other XPish features…
Didn’t take me long. As I was looking for a way to change the screen resolution (you may have noticed…) I stumbled upon the ‘new look’ control panel. While it uses HTML as opposed to the API way of making things look nice in XP, it’s a definate departure from the 9x and win2k way of doing things. And while it looks a bit web 1.0 to us now, I guess this was pretty special when it was thought up 9 years ago! So, flicked through some of the more advanced options and user accounts seemed much more like XP than the things that went before. I set up a few, restarted the machine, and was greeted with something familiar…
Yeah, that’s a welcome screen. You heard it here first – one of the most celebrated features of Windows XP actually originated right here in Neptune! It comes complete with guest account (with a magic 8 ball for some reason…) and even the turn off the computer button. It’s not quite blueandgreen, but it’s certainly the welcome screen!
But alas, all of this wasn’t meant to be. The goal of Neptune was to develop a home user operating system that used the NT kernel that had only previously been developed for business users. It was designed to replace the older DOS-based Windows 9x home user operating systems, but after the release of Windows 2k, the Neptune team was combined with the Windows 2000 team to work on the “Whistler” project that then became the Windows XP we know and love, and Microsoft released another home user DOS-based operating system in the mean time. I think you all know what version of Windows that turned out to be… Good old Windows ME.
Still, nearly a decade on, it’s nice to look back and acknowledge that while Neptune never saw the light of day, some of it’s best features survived on to XP, Vista, and who knows where else they might go…
.gif)
.gif)
.jpg)
.gif)
.gif)











