All posts by Craig Murphy

C# Lists, updated to use LINQ

During 2006 I wrote a post about C# Lists. Of course, technology moves on, C# is no exception to that rule.

Whilst the examples I used in the 2006 blog entry still work today, LINQ heralds further levels of elegance and reduced the number of lines of code required to achieve the same results.

Here are the examples updated to use LINQ:

[code lang=”C#”]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
public class Person
{
public int age;
public string name;

public Person(int age, string name)
{
this.age = age;
this.name = name;
}
}

static void Main(string[] args)
{
Listpeople = new List();

people.Add(new Person(50, “Fred”));
people.Add(new Person(30, “John”));
people.Add(new Person(26, “Andrew”));
people.Add(new Person(24, “Xavier”));
people.Add(new Person(5, “Mark”));
people.Add(new Person(6, “Cameron”));

var unsorted = from p in people select p;
var sortedByAge = from p in people orderby p.age select p;
var theYoung = from p in people where p.age < 25 select p; var sortedByName = from p in people orderby p.name select p; foreach (var p1 in sortedByName) Console.WriteLine(string.Format("{0} {1}", p1.name,p1.age)); Console.ReadLine(); } } } [/code] On line 38, simply replace sortedByName with any of the other result sets. The use of LINQ in this simple example does demonstrate increased readability - the LINQ expressions are easier to understand than those present in the 2006 blog entry. If lines of code are your metric (and for some they are!), the LINQ version's conciseness does mean a reduction in the LOC count.

Net Developer Roles – C# 3.5, ASP.NET MVC, AGILE, TDD – East Kilbride – NetIDme Ltd.

.Net Developer Roles, Competitive Salary @ NetIDme Ltd.
C# 3.5, ASP.NET MVC, AGILE, TDD
East Kilbride, Scotland, UK
http://www.netidme.com

We are looking for a number of .Net developers, both senior and junior, to join our team in Scotland,UK developing exciting products in the digital identity and communications arena. You should be happy working for a cutting edge, dynamic, fast moving company.

Developers must be able to demonstrate the following skills and experience:

  • Experience with C# and ASP.NET
  • A strong grasp of object-oriented design
  • Ability to produce quality code across all layers of a web application stack
  • 3+ years development experience on commercial or open source projects

Experience in any of the following areas will prove advantageous:

Interested?

Send your CV to: recruitment@netidme.com, including an indication of your salary expectation.

Please Note: All prospective employees must undergo a Disclosure Scotland check

NO 3RD PARTY REFERRALS PLEASE

OpenID,Information Cards, CardSpace, ASP.NET MVC, TDD, nHibernate,Castle Project

057 – Matt Lacey on Windows Mobile…

Podcast feed – subscribe here!

In this show I’m talking with Matt Lacey about Windows Mobile, the devices that you might meet if you are developing for the mobile market, the challenges that present themselves and the solutions that are in place. Matt also tells us what tools we need in order to develop or target mobile devices.

This podcast: http://www.craigmurphy.com/podcasts/057-Matt-Lacey.mp3

Resources
wurfl
Matt on Twitter
Matt’s web-site
DevEvening user group

Technorati Tags: , , ,

056 – Paolo Barone on academia, XNA, Silverlight, Twitter and Windows 7

Podcast feed – subscribe here!

In this show, I’m joined by Microsoft Academic Evangelist Paolo Barone. We talk about Paolo’s role promoting Microsoft and .net in academia, XNA, Silverlight, Twitter and close with a chat about Windows 7. You’ll also get a chance to hear my [dreadful] attempt to close the podcast in Paolo’s native language!

During our chat about Twitter and Windows 7, we noted that Steven Sinofsky was very open to community feedback…hopefully this short recording is enough to convince Steven to join us all on Twitter where feedback is almost constant, first-hand and directly addressable!

This podcast: http://www.craigmurphy.com/podcasts/056-Paolo-Barone.mp3

Resources
Paolo’s blog
Paolo on Twitter
Steven Sinofsky, Senior Vice President, Windows and Windows Live Engineering Group

Technorati Tags: , , , , , ,

UK, London 20-24 April 2009: Windows OS Internals & Advanced Troubleshooting

What:
US MVP David Solomon is running a Windows OS Internals & Advanced Troubleshooting

When:
April 20th -24th

Where:
London, UK

Description:
A public offering of David Solomon Expert Seminar’s hands-on Windows OS Internals & Advanced Troubleshooting class is taking place in London on April 20-24. Gain a deep understanding of the internals of the core operating system components and how to leverage advanced troubleshooting tools to dig beneath the surface when things go wrong.

Registration:
The URL to register and for more details is http://solsem.com/london.html

055 – Andrew Burnett on SEO, Twitter, Talk 107

Podcast feed – subscribe here!

In this show, Andrew Burnett shares his experiences of Search Engine Optimisation, Twitter and radio broadcasting. Andrew’s claim to fame, or “ego stroke” as Andrew refers to it in the podcast, is appearing at the top of a list of Top 83 tweets of 2008!

Twitter to implement OAuth?
I mentioned Twitter authentication in this podcast. Specifically I was thinking about OAuth. Further information can be found here and here.

This podcast: http://www.craigmurphy.com/podcasts/055-Andrew-Burnett.mp3

Resources
Andrew Burnett Webarchitecture
Andrew on Twitter
Zappos
Zappos on Twitter
Being Visible, Or My Theory On Avatars
Loic Le Meur on Twitter

Technorati Tags: , , , , , , , , , , , ,

3 * DDD – DeveloperDeveloperDeveloper!

April and May 2009 are shaping up to be busy months for DeveloperDeveloperDeveloper!

First up, on the 4th of April, there is DDD Belfast. With a dedicated MVC track, this promises to be a event not to be missed! The full agenda can be found here. To register (to attend), please click here. The hash tag that’s already in use for this event is: #DDDBelfast

Next, on the 2nd of May, there is DDD Glasgow. All the information you’ll need can be found here.

The 23rd of May sees DDD South-West in Taunton (not Exeter as I had previously thought!). Click here to register (to attend) for this event!

The beady-eyed amongst may have noticed www.developerdeveloperdeveloper.com! This is a new portal site that we created in 2009 (huge thanks to @plip and @davesussman). We’re hoping to use this portal as the primary means of accessing all DDD events in the future. Watch that space!

Of course, regional DDD events doesn’t mean the end of the “Big Daddy” DDD that’s held annually in Reading! Rest assured that plans are afoot for DDD8, follow @developerday to keep track of all things DDD!

Technorati Tags: , , , , ,

Win32/Conficker.B/Downadup infections

In short: make sure your system is patched for MS08-067 – use Windows Update to help you.

—————————————————————————

Abstract
Based on feedback Microsoft are concerned about the rise in reported infections due to the worm Win32/Conficker.B also known as “Downadup.” Though systems which have already applied the out-of-band released MS08-067 in October 2008 are protected, unpatched system user have experienced system lockout and other problems.

Last week, Microsoft released a version of the Malicious Software Removal Tool (MSRT) that can help remove variants of Win32/Conficker and other resources.

Background
Win32/Conficker.B exploits a vulnerability in the Windows Server service (SVCHOST.EXE) for Windows 2000, Windows XP, Windows Vista, Windows Server 2003, and Windows 2008. While Microsoft addressed this issue in October with Microsoft Security Bulletin MS08-067, and Forefront antivirus and OneCare (as well as other vendor’s antivirus products) helped protect against infections, many systems that have not been patched manually through Server Update Services and Microsoft/Windows Update or through Automatic Updates have recently come under attack by this worm. Attacked systems may lock out users, disable our update services and block access to security-related Web sites:

In response to this threat, Microsoft has:

  • Updated the January version of the MSFT to detect and remove variants of Win32/Conficker.B. You can download this version from the MSRT from either the Microsoft Update site or through its associated Knowledge Base article (see next bullet point)
  • Created the KB article 962007 “Virus alert about the Win32/Conficker.B worm” to provide public details on the symptoms and removal methods available to address this issue.
  • Announced the release of the items and the virus threat itself on the Microsoft Malware Protection Center blog.

It is Microsoft’s hope that these resources can assist you in resolving issues with unpatched, infected systems and that you can apply MS08-067 to any other unpatched systems as soon as possible to avoid this threat.

Technorati Tags: , , , ,

Music and comedy don’t understand politics…what are you doing on 20/01/09?

To celebrate a great day in history in the greatest city in the world, the Ibbamo Trust is hosting one of the largest celebrations for the inauguration of Barack Obama as the 44th President of the United States of America.

This party will have the award winning Lemar, the platinum selling N-Dubz, YolanDa Brown, DJ Ironik, DJ Abass, Twin B, Ava Leigh along with the London Community Gospel Choir as entertainment with many other special guests and speakers. Comedy by Eddie Kadi with Patrick Alen and the Music Box Live band!

Limited tickets start at £18.50 and are available through Ticketmaster. For special bulk rates email tickets@20109change.com

Come celebrate with the world!

Further information can be found at the event’s web-site and at theo2.co.uk

Technorati Tags: , , , , , , , , , ,