Opening and editing an Adobe Illustrator file using Expression Design

Open and edit a .ai file using Expression Design

The other week, I needed to edit the original source files for the Aberdeen Developers .Net User Group in order to change the size of the png’s that I use for various things (like avatar’s, etc).  Unfortunately, these were created using Adobe Illustrator, which I don’t have access to.  I had a hunt around, but I couldn’t find a way to do it.  Enter Twitter…

The ever knowledgeable Scott Lovegrove (@scottisafool), made a great suggestion of using Expression Design to open and edit the files.  I had thought that Expression Design was only part of the Expression Studio, which I also don’t have, but…

Expression Design is free!

Although it used to only be part of the Expression Studio, Express Design is now actually free!  You can download it from here.

Opening and Editing the file

This couldn’t be simpler!  Open up Expression Design, and open the file.  Once open, you will have the option to Export the image:

Expression Design Export Menu

Expression Design Export Menu

On the next window, you will then be able to choose the output format, and also the size of the resulting image:

Expression Design Export Options

Expression Design Export Options

Simples!  Thanks again Scott!

How to keep Chocolatey Pull Request tidy, and up to date

My adventures in updating my Chocolatey Pull Request

About 3 months ago, I submitted a pull request to the Chocolatey Project.  This was a reasonably simple addition, which added a helper method within Chocolatey which allowed the creation of a generic shortcut anywhere that the user required.  As time passed, other commits were made into the Chocolatey Master branch, and my pull-request had become “dated”.  In addition, in hindsight, I had created 6 commits, for something that could have really been done as a single commit.

Last week, Chocolatey contributor Rich Siegel (@rismoney), suggested that I should rebase my pull-request against the latest in the master branch, and also to “tidy” up the multiple commits into a single commit.  The reason to do this was really two-fold:

  • rebasing against the master branch would mean that merging would be simpler
  • making it one commit would mean that the commit history would be cleaner, and if any bugs were introduced as a result of the pull-request(s) it would be easier to find this in the history

My immediate response was, “I would love to do this, but how the hell do I do that?!?”. Thankfully, Rich was able to spell it out in terms that even I was able to understand!  So that I can refer back to this in the future, I decided to capture the details in this blog post.

Where we were…

This was the situation that I was in:

  • I had taken a fork of the Chocolatey code into a new repo
  • I had created a branch called Issue-235 which is where my commits had been added
  • By branch was behind chocolatey/master by a few commits

Where we wanted to get to…

Where we were trying to get to was:

  • My branch brought up to the latest code that was in master
  • Rewrite commit history by reducing all commits (I had 6) into just one
  • Update single commit comment to include all details
  • Update pull request

What was required

The following gist contains all the commands that were executed:

The final part of what was desired, i.e. updating the pull-request with the changes, haven’t automagically.  Thinking about it, this makes sense.  Your pull request is “linked” to the commits in your forked branch.  When this changes, the pull request is also updated.

I have to say a big thanks to Rich for all his help on this.  I learnt a lot by doing this!

Should Contributors keep their pull requests up to date?

Within the discussion of this pull-request, Chocolatey creator Rob Reynolds (@ferventcoder) suggested that it wasn’t the responsibility of the creator of the pull request to keep it “up-to-date”, but rather for the project coordinators to either accept or reject the pull request quickly enough that keeping it up-to-date would not be required.  Personally, I think that this would be the “ideal”, but that we don’t live in an ideal world.  Time constraints always mean that things don’t happen as quickly as we would like, and as a result, we, as the community, should do what we can to help out.

Loupe Desktop is now Free

…that’s right, Loupe Desktop is now free!

In case you hadn’t heard, the Gibraltar Software product Loupe Desktop is now being released completely free!  For more information about the reasons behind this decision, make sure to check out the blog post here.  This announcement comes not long after the recent release of Loupe Desktop 3.5.  You can find out about all the new features here.

As yet, I haven’t had a proper chance to play with Loupe, but it is most certainly on my list of things to check out, and with it now being free, it is even more appealing!

Getting Started with ASP.Net and Loupe Desktop

If you are interested in finding out more about Loupe Desktop, and how it can be used, be sure to check out Gary Short’s (@garyshort) introductory video below:

Upgrading the RAM of my Synology DS1512+

Increasing my Synology DS1512+ RAM to 3GB

I have to say, I love my Synology DS1512+!  Out of the box, it comes with 1GB of RAM, which, if you are solely doing file sharing, is more than enough.  However, over the last couple months, I have started doing more and more with my Synology Server:

  • Hosting Web Sites
  • Running a Plex Media Server
  • Backing up to the Cloud using CrashPlan

As a result, I have noticed that certain things are taking longer than they “should”.  I decided that I wanted to increase the amount of RAM that is in the device.  Digging around the Synology Forums it was clear that this is possible (with some people reporting that they were able to get 4GB to be recognised), it is just a case of deciding what RAM to go for.

I opted to go for this from Amazon, and I am happy to report that it all worked perfectly!  After installing, the RAM was immediately detected, and the Synology Server is running very smoothly.  Definitely recommend the upgrade to anyone who has not yet done it.  Very cheap to do, with a marked improvement in performance.

Synology RAM Upgrade Complete

Synology RAM Upgrade Complete

Video Help

If you are unsure about how to complete the memory upgrade, the below YouTube video should help you out:

Mike Taulty and Andy Wigley coming to Scotland!

Full day developer session in Scotland

It is with great pleasure that I am able to tell you that, with the help of Scottish Developers, Microsoft Evangelists Mike Taulty and Andy Wigley, are going to be doing a full day of sessions in Edinburgh on Saturday 1st June 2013.  It is expected that the day will run from 10am – 4pm, consisting of four different topics:

  • Windows 8 – The Developer Overview
  • Windows Phone 8 – The Developer Overview
  • Azure Mobile Services – Quick, Easy, and Powerful Mobile Backends
  • Architecting & Building Shared Code for Windows and Windows Phone

Currently, full details of the sessions, and what is going to be contained within them, is still being prepared, but if the session names are anything to go by, this is going to be a great day!  Registration for the day is open, and spaces are limited, so I would encourage you all to get registered as soon as possible.  You can find the registration page here.

Unfortunately, I won’t be able to make it as I will be moving into our new house the day before, but I look forward to hearing all about it!

Sponsors

If there are any companies out there who would like to help sponsor the event, in order to provide food and refreshments, then any help would be gratefully received.  Feel free to get in touch either through me, or by tweeting @scottishdevs, or emailing support@scottishdevelopers.com

Review of DevOpsDays London 2013

DevOpsDays has now finished, but had a great time…

In a change to the normal Developer Conferences that I attend, I have just finished up at the DevOpsDays London Conference.  More and more I have hearing about how you can better improve the deployment of applications and software by closely combining both the Developer and Operations teams.  This is a relatively new idea to me, and I was very interested to hear, from people who have done this, what can be achieved!

This was a very “different” conference to what I have attended in the past, but in this case, “different” is a good thing!  The format was similar, in the sense that there were prepared session on each morning from various speakers, but each afternoon was given over to Open Spaces (more on this below).  I had never been to an Open Space session before, and I was very intrigued.  Turns out they are a GREAT way to learn!  In addition, just before lunch time, there were a series of Ingite talks (again, more on these below).

Overall, I got a lot from this conference.  After two days of hearing what can be done in terms of Configuration Management, Automated Deployments, Team Collaboration, my mind is buzzing with how some of these principles can be taken back to the office.  As to how many we will be able to implement, that is another question, but the fact that I now know that some of them exist, is half the battle!

What follows are some rough notes taken across the duration of the two days.

Prepared Sessions

In total, across the two days, there were seven prepared sessions.  Details on these can be seen below:

  • Niek Bartholomeus
    • “DevOps for Dinosaurs”
    • This was a really great introduction to what DevOps is, and what it is trying to achieve.  The talk centered around the work that Niek had done in a company that he worked at to bring DevOps processed into being.  It was really great to hear the experiences from someone who had been through the process.
    • Slides
  • John Clapham
    • “Checking DevOps Vital Signs”
    • In this talk, John explained how in applying DevOps to his organisation, they attempted to garner some metrics so that they could accurately “measure” how it was helping.  This is a big stumbling block for DevOps.  i.e. how do you prove that the system is working, and actually providing value.  They chose to do this by measuring several vital signs (Cycle Time, Shared Purpose, Motivation, Collaboration, Effectiveness).  The first is reasonably simple to measure, but the others not so much.  They opted to collect this information in the form of a questionnaire.
  • David Mytton
    • “StartOps: Growing an Ops Team from 1 founder”
    • Again, another interesting session, where David explained the decisions that he had taken in establishing his business.  He was in a position where he had to be pragmatic in adopting the tools and processes that he did.  As the company grew, he was able to adopt different tools and services, to ensure that the company was heading in the right direction.
    • Slides will appear here
    • Some interesting posts here
  • Deri Jones
    • “Adding Business Metrics”
  • Thomas Falkenberg and Nils Probson
    • “DevOps and the traditional Enterprise IT”
    • A very open, and honest, discussion of how the team at Payback had slowly, over the period of two years, implemented a culture of DevOps.  They found that they are now in a position where Dev and Ops teams have common goals.  However, this can only be achieved by:
      • Working together
      • One step at a time
      • Change takes time and patience
    • An important takeaway from this talk “The term DevOps helped form a common language, a mantra.  i.e. if the business has a problem, then the company, both the Dev and Ops, need to work together to fix the issue
  • Sam Eaton
    • “DevOps and the hell of a Thousand Different Platforms”
    • This was an amazing talk!  Sam is clearly enthusiastic about this topic, and this flowed through in his talk.  I later found out that this was his first public talk, which certainly didn’t show!  He had some very interesting ideas, the best of which was the “FailCake”.  Basically, in collaborating between Dev and Ops, it is “ok” to make mistakes, but these have to be discussed immediately within the team, without associating blame.  They best way they have found to do this is by bringing cake to the meetings!
  • Gene Kim
    • “How can we better sell DevOps”
    • This was a VERY inspiring session.  Gene Kim, an author of the hugely popular “The Phoenix Project” book, explained how to best sell DevOps within the enterprise.  I would highly encourage you to take a look at the slides linked below as they explain, in detail, the barriers that exist Dev and Ops team, and how they are perceived from either side.
    • Slides

Open Spaces

For me, this was the stand out part of the conference.  I had never been to an Open Space before this conference, but I will definitely be looking to attend others.  I am also going to suggest that this is something that we should be looking to include within DDD events.

The format is reasonably simple.  Anyone can suggest a topic to be discussed in an Open Space.  This can be asking for an answer to a question.  Providing a demonstration of a piece of software, or technology.  Pretty much anything.

With the sessions proposed, these are then organised “roughly” into order, and people “vote” with their feet, and go to the sessions that interest them.  This then takes the form of an open discussion, where anyone is free to talk, ask questions, and provide input.

We were told that Open Spaces follow three main principles:

    • Whenever it starts is the right time
    • Whatever happens is the only thing that could have
    • It’s over when it’s over

All I can say is…

Amazing!  I got so much out of these sessions.  So many snippets of information, and suggestions.

Ignites

Before attending DevOpsDays, I hadn’t heard of Ignites.  Turns out this form of talks (which were held on both days just before lunch time) are similar to the 20 x 20 talks that I have seen at DDD events.  Basically, there are a set number of slides, each of which are timed to automatically transition to the next slide.  The speaker has to keep up with each transition, as they can’t go back to a previous slide.  Topics here ranged from a custom-built tool for automatic deployments to being conscious of the server farms that you are using and their carbon footprint.

Well done to everyone who was brave enough to do one of these Ignites, I still think the format is very difficult, and I wouldn’t like to do one myself.

Some of the slides that I am aware of from these Ignites can be found here:

Recommendations

During the various sessions, and Open Spaces, there were a number of recommendations made.  These included blogs, podcasts, books, etc.  I have captured the ones that I could below.  If I have missed anything, or if there are any that you would like to add, please feel free to get in touch.

Newsletters

IRC Channels and Application Recommendations

  • ##infra-talk” – DevOps IRC Channel
  • irssi – Windows IRC Client
  • IRCCloud - Web Based IRC Client

Book Recommendations

Podcast Recommendations

Review of Day 5 of DevWeek 2013

Today was the last day of DevWeek

Well, it has been a long, but enjoyable, week at DevWeek, and today was the last day.  Today was another full day workshop, and I decided to attend the Continuous Delivery Workshop with Neal Ford.

People who have been following this series of posts will know that I have been rather lucky, winning both a Surface RT and a Telerik DevCraft Complete License.  There were no prizes won today, but you will all be happy to know that I have purchased a Euro Millions lottery ticket.  I will keep you posted on whether I win anything :-)

Review of the other days of DevWeek can be seen here:

Post-Conference Workshop at DevWeek

Presenter: Neal Ford (you can find his blog here, and his twitter here)

Topic: Continuous Delivery Workshop

Getting software released to users is often a painful, risky, and time-consuming process. This workshop sets out the principles and technical practices that enable rapid, incremental delivery of high quality, valuable new functionality to users.
Through automation of the build, deployment, and testing process, and improved collaboration between developers, testers and operations, delivery teams can get changes released in a matter of hours – sometimes even minutes – no matter what the size of a project or the complexity of its code base.
The workshop materials are derived from the best-selling book ‘Continuous Delivery’, and were created in collaboration with the authors and other of my ThoughtWorks colleagues.

Thoughts

Overall, I have to say that this was a very well structured and executed presentation.  Neal obviously understands this area very well, and was able to field a number of questions from the audience.  There was loads of active conversation from the audience, which made it even more interesting.  Lots of conversation regarding real-life situations, and experiences.

The one thing that I thought was missing from the Workshop was some demos.  There was lots of description of the deployment pipeline, and using puppet to automate the configuration of a server, but I think what really would have cemented these ideas was an example.  Even if this was a simple website application being packaged, and deployed onto even a single server, at the click of a button.  This would have made for a very cool end demonstration to summarize the whole discussion.

Takeaways

There really was loads to think about in this talk.  Some of the stand out questions, takeaways were as follows:

  • How often do you release to users?
    • Correct answer of course is that you should be ready to release to users whenever they require it.  Software should always be in a deployable state.
  • How long would it take your organisation to deploy a change that involves just one line of code?
  • Thinking about the above, can you do this in a repeatable fashion, that doesn’t involve crazy amounts of over time?
  • Make sure there is a clear delineation between Unit Tests and Functional Tests, and run these as separate parts of your delivery pipeline
  • Features Toggles gives you an alternative to creating many Feature Branches, avoiding the problem of merging
  • Going Live should be just another deployment that you are already practiced at internally
  • You should strive of Continuous Integration of your Databases as well as code
  • Look to make use of Puppet and Chef to configure development and staging environments, and store the configuration within your source control
  • When implementing Continuous Delivery, first gather metrics of current state of deployment, i.e. lead times and cycle times, and then compare after implementing Continuous Delivery

Quotes

  • “Melt down silly architectural barriers between different areas of the organisation”
  • “If it hurts… Do it more often!”
  • “Bring the pain forward”
  • “Rational ClearCase i the most hostile pice of software towards Agile Development”
  • “Git is one of my favourite tools”
  • “Avoid life in the knitted Castle”
  • “The biggest PITA around software updates is data migration and schema changes”

Book Recommendations

Overall Thoughts

As I have said in my other posts, I have had a really good time at DevWeek, and I am happy to say that I have learnt a lot this week.  Hoping to be able to take back a lot of what I have learnt and start applying them at work.

Huge congratulations to the organisers of DevWeek, they did a great job, and a huge thanks to all the staff of the Barbican and the helpers at DevWeek!

Review of Day 4 of DevWeek 2013

And the winning continues at DevWeek…

I am very happy to say that today started where yesterday finished off.  I won a Telerik DevCraft Complete license.  Big thanks to Telerik for this! As a number of people on twitter have suggested, I will be purchasing a lottery ticket for this weekend!  Who knows, I might be a winner!

First Morning Session

Presenter: Brock Allen (you can find his blog here, and twitter here)

Topic: Internals of security in ASP.NET

Security is crucial for online applications. This session on security discusses the basics and then the internals of authentication and authorization in ASP.NET. We will discuss Windows and Forums authentication, how roles are assigned to the user and how to control authorization in both WebForms and MVC applications.

Thoughts

As per Brock’s talk yesterday, this was another very well executed presentation, detailing the fine details of how Security works in ASP.NET (both Windows and Forms Authentication).  This talk got down to the nitty-gritty of how things work, with lots of great insights that showed how depth of knowledge on the subject.  You could argue that some of the topics were “common sense” but that doesn’t mean that everyone does them.  It is only when they are laid out in detail as they were in this talk, that you start to think about what you need to do in your own applications.

Takeaways

  • You can add certificates into Fiddler (which allows you to do “man in the middle” attacks on yourself
  • Encryption should not be used to store passwords, you should hash the password
  • Think twice about using MembershipProvider (and SimpleMembership)
  • MembershipReboot – open source alternative to the above
  • FormsAuthenticationModule – intercepts all requests, and does the authentication from the cookie that is sent with the request
  • If you are doing ajax calls, you can use the HttpContext.Response.SuppressFormsAuthenticationRedirect to prevent the default redirect that would happen (which is of little use in ajax call)
  • The Authorize Attribute can be used to secure on both Roles and Users

Quotes

  • “If you are not doing SSL, you are not taking this serious!”
  • “We’ve been gabbing and gabbing about authentication, what about authorization?”

Rest of the day

The final session of today was one on NoSQL (specifically MongoDB) and I was very interested in seeing this!  On reading the schedule for the other sessions, it was clear that Michael was doing three back to back sessions, that each built on top of each other, to complete a full application.  Essentially, another full day workshop.  As a result, I decided to attend all three of them.

Presenter: Michael Kennedy (you can find his blog here, and twitter here)

First Topic: Nine ways your next ASP.NET MVC project can be better

So you’re ready to start that new and ambitious ASP.NET MVC project. Maybe you’re kicking off a new startup or just finally moving that old-and-crusty Web Forms project into the modern development world. Either way, this talk will give you some easy things you can do immediately after creating that new MVC project that you will thank yourself for as your project grows in complexity.
This talk will be based on my related blog post here: http://bit.ly/QoCxnC
We’ll examine each piece of advice using live demos with Visual Studio and some external tools such as YSLOW. We’ll also look at how to “modernize” MVC 3 projects with best practices built into MVC 4 projects (CSS bundles, etc.).

Second Topic: Building rich input forms in ASP.NET MVC

ASP.NET MVC has gained broad adoption over the last year. This is in part due to its clean and simple design. However, one aspect that newcomers typically get hung up on is building pages that accept user input in various manners. In this talk we will explore the powerful features of ASP.NET MVC that allow us to build rich forms that accept user input. We’ll begin by discussing the built-in HTML Helpers and Model Binding. Next we’ll add validation and show how we can do both client and server-side validation using DataAnnotations. We’ll see that sometimes using domain models as our form-bound objects doesn’t make sense and so we will cover more advanced scenarios using View Models. Finally, time permitting, we’ll see how client-side programming with JavaScript and jQuery can take this even further.

Third Topic: Applied NoSQL in .NET

Perhaps you’ve heard about the next generation of databases roughly classified as NoSQL databases? These databases are generally much better than RDBMS at scaling, performance, and ease-of-development (e.g. in NoSQL the object-relational impedance mismatch usually disappears). Unfortunately, many talks on NoSQL are very academic and general. Not this one.
This session will introduce the ideas around the so-called NoSQL movement, and we’ll learn how to leverage MongoDB (a popular open source NoSQL db) to build .NET applications using LINQ as the data access language. We’ll build out a .NET application using LINQ and MongoDB in a series of interactive demos using Visual Studio 2012 and C#.

Thoughts

Overall, this was a really good series of presentations.  Each one built on the last, and the end result was a complete sample application that shows how to create an ASP.NET MVC Application, using MongoDB as the back-end.  I have been told be Michael that both the sample code for the talks and the slides will be made available, so I will be keeping an eye out for those!

The final session, although the most interesting for me, was (in my opinion) a little rushed in terms of the code that was shown, and there were a couple of problems during the demos that meant there was a bit of jumping around in the code.  However, this was more than made up for in the question and answer session at the end of the talk, lots of great info here, especially the discussion between whether to use MongoDB or RavenDB.

Also, during the second session, there was quite a lot of banging noises coming from elsewhere in the Barbican Centre, which was a little off-putting.

Takeaways

  • Lots of great tips about how to improve the default ASP.NET MVC project.  Far too many to list here, but check out Michael’s blog post linked above.
  • Suggestion to use front-end frameworks for CSS
  • Make use of a reset.css
  • Make use of the Get, Post, Redirect pattern
  • For server-side validation, use ModelState.IsValid
  • MarkDownDeep – very cool
  • MongoDB runs as a Windows Service
  • There are numerous Management Tools including:
    • MongoVue
    • LinqPad
  • Any changes to the “schema” of the objects, will require running a script on the existing database
  • In production, you should have at least two instances of MongoDB

Overall Thoughts

Another busy, but highly enjoyable day at DevWeek.  Was also able to squeeze in a kick lunch meeting with Paul, Hadi, Matt, and Howard.  Was great to catch up with people I haven’t seen in a while, as well as put faces to twitter names!

Review of Day 3 of DevWeek 2013

Today, I won a Surface at DevWeek…

What follow is a brief summary of the session that I attended at the 3rd overall day of DevWeek 2013 (the second day of actual sessions).  Review of the other days of DevWeek can be seen here

So today was a great day!  Not only were there some top class presentations on Async ASP.NET, JavaScript, Web API and SignalR, but I was also lucky enough to win a Surface RT!  This was thanks to K2 who were running a prize giveaway.  Huge thanks go to them, and although they didn’t have the Surface to give me on the day, I am reassured that this will be delivered to me as soon as they have it available :-)

First Morning Session

Presenter: Brock Allen (you can find his blog here, and twitter here)

Topic: Async ASP.NET

Asynchronous programming is all the rage these days and was a major theme in the most recent release of .NET. In this session we’ll look at what async means for web applications for both client and server code. We’ll see how ASP.NET has had async support for over 10 years and how WebForms and MVC provide an easy to use async programming model. We’ll then look at async client programming using JavaScript and jQuery, HTML5 WebWorkers and finally we’ll conclude with the ever popular SignalR library for supporting async communication.

Thoughts

I really enjoyed this presentation.  It was almost a near perfect continuation (see what I did there?) to Andrew Clymer’s talk that I went to yesterday.  This talk went into specifics about how things used to be done in ASP.NET and how you can start to make use of both Task, and async/await in ASP.NET.  There were loads of samples shown, and his slides were very detailed, which meant that it was really easy to follow along.  Great presentation!

Takeaways

  • ASP.NET has had async support since .Net 1.1
  • HttpTaskAsyncHandler base class is new in .Net 4.5
  • HttpContext is NOT thread safe, i.e contexts don’t flow by default, so when doing continuations manually, you have to take care of ensuring the original context is passed into the callback.
  • jQuery doesn’t work in WebWorkers, since it is dependent on the DOM.  There is however a stripped down version of jQuery available which you can use in WebWorkers
  • jQuery supports a “promise” i.e. the .then() syntax
  • Brock indicated that the source code for his presentation will be available on his blog in due course.

Second Morning Session

Presenter: Hadi Hariri (you can find his blog here, and twitter here)

Topic: Just because it’s JavaScript doesn’t give you the right to write rubbish

JavaScript, the language that we all laughed at and our usage of it was limited to copy/paste of scripts to have some dynamic content in a web page, has all grown up. From jQuery on the client-side to Node.js on the server, everywhere you look there’s JavaScript. Unfortunately there’s also a ton of horrible, twisted and somewhat convoluted code that would make any developer that remotely cares about clean code suicidal.
A dynamic language that has somewhat given us a licence to do anything we want has been abused to the point that much of the blame has been placed on the language itself as opposed to the developers.
In this talk we’ll discuss some of the patterns and anti-patterns of JavaScript, things you should and shouldn’t do.

Thoughts

This was by far, the BEST presentation that I saw today!

Ok, so Hadi asked me to say that, but seriously, I felt that it was a very good talk.  Hadi raised a very interesting question in “how” JavaScript is being developed.  In many ways, it is still seen as the “baby brother”, the “scripting language”, the “User Interface Language”, and as a result, it doesn’t get treated with the same respect.  When you are doing other development, there are things like Unit Testing, Code Coverage, Continuous Delivery, etc.  Now, he wasn’t saying that there aren’t the equivalent systems for JavaScript, but rather, that they are not used with the same vigour.  If we, as developers, are going to start utilising JavaScript to the extent that we are likely to, we have to start giving it the respect it deserves.  This means actually “learning” it, rather than just copy and pasting from online sources.  A very well thought out and well executed presentation!

Takeaways

  • Common issue with writing code – as you write more, it becomes harder to maintain.  Writing with JavaScript takes you quickly down this route.
  • Historically, there hasn’t been much tooling for JavaScript.  This has now changed, and it needs to start being used.
  • JSLint.com – online validation for JavaScript
  • Always use ===

Quotes

Due to Hadi’s style of presentation, there are quite a few quotes here, many of which I believe were said in jest, so please don’t take them out of context:

  • “Feel free to get up and leave”
  • “The aim of this talk is to show you how utterly crap JavaScript”
  • “As though JavaScript of the client isn’t bad enough, now we have it on the server!”
  • “JavaScript is a ‘write-once’ language” – i.e. you never want to look at the code again
  • “Hopefully I will convert you, and you will all hate JavaScript”

Book Recommendations

First Afternoon Session

Presenter: Dominick Baier (you can find his blog here, and twitter here)

Topic: Patterns and techniques for securing REST/HTTP-based services and (ASP.NET) Web APIs

The industry is moving to an HTTP/Web API based approach when it comes to modelling web services. These services are typically much more lightweight compared to their SOAP counterparts, which makes them easier to use in cross-platform and device architectures. But are they maybe too lightweight? Can they fulfil the security requirements? It turns out they can! In this talk we will have a look at how authentication and authorization can be implemented in HTTP-based services in general, and we’ll have a look at the security features of Microsoft’s new framework called ASP.NET Web API in particular. In addition we’ll shed light on what terms like OAuth2, JWT, OpenID and WS-Federation actually mean, and where these technologies make sense.

Thoughts

With all the buzz around Web API, it was interesting to hear in this session what needs to be done “behind the scenes” to ensure that things are secure.  There are several gotchas, such as lack of built-in support for cross domain applications in Web API.  The infrastructure is there to do it yourself, but it is a lot of work, and you have to know what you are doing.  Thankfullly, Dominick, and his mates at thinktecture have created the IdentityModel and IdentityServer (which can be found here) which attempts to fill this void.  These projects are open source, and released under an MIT license, meaning that you can do whatever you want with them.  A very good presentation, although, I did feel that in parts, it was a little rushed.  Also, no fault of Dominick’s, but the room was a little warm, which I think was a contributing factor to the guy in front of me sleeping through out the entire talk.  I think several people were put off by this, as the gentleman in question was snoring quite loudly, but no-one had the heart to wake him.

Takeaways

  • All Web API Security is built on top of SSL
  • Authorize Attribute on ApiController specifies what Authentication is required
  • New AllowAnonymous Attribute to specify that no Authentication is required
  • You can create your own Authorization Filter
  • No built-in support for Cross Domain applications
  • Useful site for decoding tokens
  • Token-based Authentication is “THE” way to do it
  • When generating tokens, keep the token lifetime short

Quotes

  • “IF you are ignoring SSL Certificate Errors, you are not doing security properly”
  • “For some reason it is in German… That means it is extra secure!” – when talking about a login prompt that appeared in German text

Second Afternoon Session

Presenter: Christian Weyer (you can find his blog here, and twitter here)

Topic: I wanna be cool! Push communication with SignalR for the web & beyond

Google, Facebook & Co. are leading the way: users want to see data and updates, live & now. There is need for a server or service to send messages and data into clients – without the client actually explicitly asking. Christian Weyer shows how .NET developers can implement this with SignalR – a framework with a simple yet powerful programming model. You should not have to care about the underlying protocols and (quasi-) standards in order to realize bi-directional communication over standard network infrastructure with potentially any device (desktop, browser, mobile) – not just for the web.

Thoughts

For me, Christian’s session at last years DevWeek was a stand out one!  He is an amazing presenter, and clearly loves what he does.  This session was no exception!  We were taking on a whistle-stop tour of SignalR, including loads of real world examples, that really help to drive home how SignalR could be used in practice.  If you have never been to one of Christian’s presentation, you owe it to yourself to go along to one!

Great job!

Takeaways

  • Wow, just wow!  He showed how, using SignalR, you can surface changes that were made directly to the database (using SQL Server Management Studio) could be surfaced to a DataGrid running in the browser.
  • CEFSharp – an embeddable version of Chrome that you can run in your .Net Applications
  • Suggestion that you don’t create native applications, in the traditional sense, but rather create native apps that host a browser, and run your application there.
  • SignalR Sample Applications – Mouse Tracking – truly mind-blowing what is being done in only a few lines of code!
  • Regardless of browser, long polling will always work and will be used as fall back connection with SignalR

Quotes

  • “If your software doesn’t contain a DataGrid, you have failed!”
  • “Dynamic! Ah, can you feel this?” – you had to be there to appreciate this one!

Overall Thoughts

Another great day of sessions, made all the better by winning a Surface RT!  Looking forward to more sessions tomorrow!

Review of Day 2 of DevWeek 2013

A busy second day at DevWeek…

What follows is a brief summary of the sessions that I attended at the 2nd overall day of DevWeek 2013 (the first day of actual sessions).  Review of the other days of DevWeek can be seen here:

In this the 16th year of DevWeek, Dave Wheeler was meant to be doing the Keynote presentation, however, due to suffering a back injury, Kevlin Henney and Steve Plank, stepped in to do two sessions for the Keynote.

First Morning Session

Presenter: Kevlin Henney and Steve Plank

Topic: “A Question of Craftsmanship” and “Advances in Cloud Computing Platform”

Thoughts

Personally, I thought that these were two very good sessions.  Kevlin’s gave a very thought-provoking discussion about thinking about code as art, and how we should be ensuring that we strive to create the best code possible.  And Steve gave a great demo of how complicated systems can be configured and deployed in Windows Azure.  I also really liked Steve’s slides, which really have to be seen to be understood.  They were essentially drawings, which were created as he was speaking.

While leaving the room, I heard some mumblings from some other delegates that the second talk was a sales pitch, but I really don’t think that this was how it was intended.  I guess you can’t please everyone!

Takeaways

Quotes

  • “You reach for the banana, but you get the whole gorilla” – Kevlin, when talking about component re-use
  • “Functionality is an asset, code is a liability”
  • “Code re-use leads to exploding rockets”

Book Recommendations

Second Morning Session

Presenter: Kevin Jones (you can find him on twitter here and on GitHub here)

Topic: Building interactive clients with knockout.js

Client side development in the browser is becoming more and more important. Clients expect highly interactive applications that respond quickly to changes. To manage this developers have to cope with the demands of JavaScript. While jQuery is a fantastic tool, sometimes it feels too low-level and maybe needs something layered on top. One such layering is knockout.js. This provides an MVVM programming model for the browser. This talk looks briefly at the basis for MVVM and then into the details of knockout.js. We will cover the data-binding that is at the heart of this toolkit looking for example at how knockout does data updates and computed values. We will also see how knockout can work with your server-side coding.

Thoughts

I went to Kevin’s full day session on Unit Testing at last years DevWeek so I knew that he is a great speaker, and I am happy to say that again, I was not disappointed.  Through a number of examples, each building on top of each other, we were provided with a very good introduction to what knockout.js is, and how it can be used.

At one point, Kevin seemed to go off on a bit of tangent when trying to describe a particular situation, when his demo didn’t do what he expected.  He was able to turn this around very well though, and the end result was a discussion about using “debugger” on the click event of any bound element to step into the JavaScript debugger of the browser you are using to enable you to figure out exactly what is going on, and what contexts are being used by knockout.js.  This was the number one takeaway from this session.  This technique is described in this StackOverflow question.

Takeaways

  • Two way bindings, by default, are applied with you tab off an element, i.e. lostFocus, but this can be changed
  • i.e. you can use valueUpdate binding with a value of say afterKeyDown
  • Knockout.js intellisense is coming in Visual Studio 2012 Update 2
  • When using a foreach binding, no HTML will be rendered if the collection is empty
  • There is a mapping plugin for knockout.js with helps with mapping to and from JSON when communicating with the server
  • It is possible to create your own extensions for knockout.js
  • There is a validation extension for knockout.js
  • I believe that the code used in this session will be put here in Kevin’s github repo

Quotes

  • “jQuery is non trivial to use, but I love it like a brother”
  • “If your heart gives out, I am not responsible” – when discussing the amazing HTML interface that he was creating

First Afternoon Session

Presenter: Scott Allen (you can find his blog here, and twitter here)

Topic: The new world of HTML5 and CSS3

WebSockets, Webworkers, animations, transitions, and SVG. These are just a few of the new capabilities we can use to build applications with modern browsers.
In this session we’ll give overviews and demonstrations of these new features and see how to build applications with the latest standards.

Thoughts

This was a very good talk.  Scott’s laid back approach to presenting makes it very easy to get absorbed in what he is saying, and you don’t realise where the time goes!  The 90 minutes were up very quickly!

The only thing that I would say is there was a lot of jumping between the PowerPoint version of his slides, and an HTML version of his slides.  I think he could have quite easily done the entire presentation from the HTML version, rather than just showing the demos from the HTML version.  Not sure why he took the decision to do it this way.

Takeaways

Throughout this talk, there were a number of sites that were shown that really help you get started with HTML5 and CSS3, so some of the below are simply links to these sites.

Second Afternoon Session

Presenter: Andrew Clymer (you can find his blog here, and twitter here)

Topic: Taking advantage of C# 5 async/await

.NET 4 introduced the new ‘task’ abstraction, and C# 5 will take advantage of integrating this into the language via the async and await keywords. Furthermore, the new task abstraction promotes a new way of architecting asynchronous behaviour; in this talk we will explore how to take advantage of these new keywords and other new types and features being exposed in the next version of .NET to deliver far simpler asynchronous Windows UI’s.

Thoughts

I was very much looking forward to this talk.  I have seen the usage of async/await before, and I have played with it in a Windows Phone application that I was creating, but I was interested to find out more about it.  There was no faulting the speakers knowledge on the subject, it was excellent, however, there were a couple of things about the talk that were slightly off-putting for me.

Firstly, the use of a second person, Richard Blewett, on stage to drive the transition of the slides, and also to generate the code.  For me, this didn’t really work.  Rich was using Andrew’s laptop that had a different configuration than he was used to which meant that there were problems when building and running code.

Secondly, when requesting that a slide be moved to the next one, there was a click of the fingers, which again for me, was quite off-putting.

Takeaways

There were actually some really interesting takeaways from this session.

  • I really liked how the history of asynchronous methods have changed through the different version of the .Net Framework
  • Anything that takes longer than 15ms to complete shouldn’t be done on the UI thread
  • You can only use the new async key word on a method that returns a void, or a Task<T>
  • Using async/await makes the compiler do the work of creating the continuations that you would have otherwise have to create yourself
  • There are techniques to use CancellationTokenSource and IProgress to provide updates back to the UI and to control execution of the Task
  • Whenever you are using a thread, whether in UI code, or on the server, you should look to implementing async/await to release threads when not being used.
  • I am expecting that the code for the presentation will be available here

Quotes

  • “If an application doesn’t respond, hit it harder, just like the kids, they respond to that” – said jokingly when discussing the lack of response from the UI when blocked by executing code
  • “She can crack an iPhone screen with her finger” – again, when discussing the frustration felt by users when waiting on a non-responsive UI

Overall Thoughts

As always, a very well executed day at DevWeek.  Everything seemed to run very smoothly.  The venue is amazing (even though it is a bit of a hike from the exhibition area to some of the rooms for talks), and the food for lunch and breaks is excellent.  Looking forward to tomorrow.  I took a few pictures on my phone, which you can see below: