The last couple of days I’ve been trying to figure out why a console application we use at work was throwing an error whilst trying to connect to oracle, we had some issues with Devart’s DotConnect for Oracle throwing the following error – ‘Error loading db connection’
Having tried a number of options it was suggested to me that I should try remote debugging, something that I had never actually done before, odd I know but I had never set this up so below are the steps I followed to get it working:-
Download and install Remote Tools for Visual Studio 2012 Update 2 here – (Make sure to install the correct version x86 or x64).
- I then started the Remote Desktop Service making sure to ‘Run As Administrator’. An entry with the date and time and a description will be shown once we connect to the remote debugging service.
- In my case I wanted to debug a console application – so I ran the console application (on the remote server)
- Make sure to have your VS 2012 solution open, add some breakpoints to the code you’re looking to debug on the remote server – its important that the code on the remote server is exactly the same as the code which is open in VS 2012 – if not breakpoints wont be hit.
- Now go back to Visual Studio and from the debug menu select Attach to Process, on this screen I change the Qualifier to the name of the remote server and select the console application process from the list of running processes on the remote server.
- If you check back on the remote server it should say that you’ve connected to the remote debugger service.
- If all is setup correctly then your breakpoints will be hit and hopefully you can figure out why your code wasn’t working
- Turned out the licence file we had been using was empty and by debugging I was able to see a more detailed exception stack trace and information.
This is how I got it running fairly easily – if you run into any issues :- For more info on setting up remote debugging follow this link here.
Hope this helps someone out there.
This week I have been busy mostly busy with bug fixing some code we have which used to be a windows service but is now a TopShelf service – if you use windows services you’ll know that there hard to debug, enter TopShelf
TopShelf is almost identical to a windows service but runs like a console app and that allows you to debug the code you would have within your windows service. To change your code from a windows service to a TopShelf service is minimal code indeed and well worth the small amount of effort.
What I learned this past week
- Visual Studio 2012 and Windows 8 are available, if you use Visual Studio 2012 then check out a fantastic extension called Web Essentials – go check it out.
- RavenDB – the guys who bring you Raven are hard at work on a 1.2 release which will bring a number of great changes, I have upgraded my home-brew project to the latest unstable version and the upgrades to the front end are cool and most welcome – more soon when I get more time hands on.
- Elmahr 0.91 is out – more here.
What did you find useful this week? – please let me know by leaving a comment after the beep.
Monday 11th May will see be me 6 months into my new job, my last place I was there for 11 years so it was quite a big thing for me moving on.
The new job is going well, I like the way we go about our work, we talk about it, we plan it, then we try as best we can to do proper test driven development.
Last week saw us starting a new RavenDB based MVC 3 project which will be using Agile techniques using sprints – it will also include some new tools which I havent yet used such as initializer and twitter bootstrapper – more on them to come as I get hands on during the project.
Starting a new project is always great, although we are under pressure to get this out the door, were luck to not having paying customers demanding software releases as soon as possible, this means we don’t cut corners and can produce code which has been thoroughly tested and due to the tools we use we know it’s of decent high quality.
Testing driven development has been quite a mind shift from what I have been used to, in the past I would have written the code and then done some manual testing usually from the front end, so this has been a great leap forward – it’s not the be all and end all of course and code can still contain bugs, however, changing code and knowing if you broke something is very nice.
The main difference has been using Resharper, style cop and unit tests along with a great build system – all checked in code has the same style and formatting which is rather nice.
I moved jobs a little under 3 months ago and I know work for Maclean Electrical as a developer in a small team.
At Maclean’s I work in an Agile development team working on a number of projects which we use to drive the business forward and make the company more productive.
Our code base is a made of a number of different projects including some windows service projects, some MVC web apps, a Windows Forms application and even an ASP.NET 2 web app.
The development team strive for a number of goals a couple of which are below as below:-
- Test Driven Development – write a failing test, write the code tp make the test pass, refactor your code.
- Code Coverage – the code you write should meet a high level of test code coverage, each project had individual levels but should be around 70% as a minimum.
- Refactor where possible – refactoring the code you come across so that you always leave it better than you found it where possible.
- If you break the build, its your responsibility to fix it, yeah it’s normally me I know.
We have a very nice setup at work using TeamCity as our build server and we have ported over a few things as Nuget packages to make life easier going forward – I can push a deployment of the code which runs all the unit tests from the build server to deployment or the test environment in one click.
At work we are about to start looking at using RavenDB and the developers are all being sent on a course in London for training on a 2 day course.
Working for a company who listens to their developers and has fantastic communication with everyone in the team is always good in my book. The developer’s in the team often chat about what technologies are new and who’s looking at what and what they have thought about it. We don’t stick with what we know and are always looking at new technology as a way of sharpening our skills which I love to do anyway.
I guess we have a team of passionate developers who communicate well and who really enjoy their jobs – if you enjoy your job it makes a huge difference. If you want a book on a particular subject then it’s ordered, if you come across a tool that you find helpful its bought.
Do you enjoy your job as much as I do? – I do hope so.
The place where I work is looking for a new developer to come on board and join our small team of talented developers working with the latest technologies in a great working environment and only 10 minutes from Glasgow. If you want to work on some cool stuff then have a look at the job role below:-
Company: MacLean Electrical (MacLean Electrical)
Location: Westfield, Cumbernauld, Scotland, G68 9LD
Do you want to be involved in leading edge projects using Microsoft technologies working with a company that cares about building quality software? If so, we have an exciting and challenging opportunity for a motivated and talented C#/.NET developer to be involved with the development of highly-performing enterprise systems to increase the productivity of our employees and the efficiency
of our operations.
Based in our brand new Cumbernauld offices the successful candidate will enjoy working within a small, experienced, energetic agile team on a rapid, agile development schedule.
The successful candidate will have an exceedingly strong technical background and be able to clearly demonstrate a sound understanding of advanced language concepts and designing enterprise n-tier platforms. Experience with TDD is essential for the role.
You will be of graduate calibre and have relevant experience in a similar role. A competitive package is available to the right applicant with the opportunity to build a career and enhance their technical abilities with a successful and progressive company.
Desired Skills & Experience
• Deep knowledge of C# 4.0 and Microsoft .NET Framework
• Solid competency in SQL with MS SQL Server
• Experience with high performance scalable application design
• Strong understanding of OO principles, SOLID principles and Design Patterns
• Strong knowledge of software implementation best practices
• Good communication and interpersonal skills with individuals and in groups, with technical and non-technical staff, orally and in writing
• Ability to quickly learn new tools/technique
• Candidate should be a self-motivated, detail oriented, and exhibit exceptional relationship management skills.
• A demonstrable knowledge of ASP.Net MVC3, jQuery, HTML and CSS (HTML 5 and CSS 3 desirable)
Ideal Candidates will have the following experience:
Years of Experience
• 6+ years experience as a developer
• 3+ years experience with C#
• 2+ years working with SQL Server (2005/2008 preferred)
• 2+ years working with HTML/CSS
Interested? – If so please email email@example.com
Note:- This will be an on going blog post.
My plan is as follows:-
Firstly I plan to write a lot more code at home, to me that’s definitely the best way to learn. My first goal this year is to get better at writing unit tests/tdd and learning how to use mocking properly.
January: Watch all of John Skeets Tekpub series on C#, go through Roy Osherove’s Unit Testing Kata’s and watch the @tekpub and @pluralsight videos on Unit Testing.
How did I fare in January?:
having set out my goals above for January I would say I have learned a lot when it comes to TDD, still got a lot to learn especially when it comes to mocking.
I have watched the first 6 of the 25 video series so still got a lot to watch and learn about. The detail in this particular series is exceptional and if you want to learn c# in detail then this is for you.
I bought the following book on Dependency Injection :-
February: Get up close and personal with RavenDB.
March: Time to start an app using RavenDB.
I shall update as we go but this is a good start. Let me know if you come across something you think is worth learning.
In 2011 I started blogging and this post will be a review of the year which is about to come to an end.
At the start of 2011 I was working on a windows mobile 6.5 project up until around April, which was the first time I have even looked at any windows mobile development – the project itself was a good one and I enjoyed working on it – my overall feeling from it though was that windows mobile 6.5 was old and clunky and things seem to have gotten a lot better with the latest version including the mango release.
From April to August I was working for Barclay’s Stockbrokers in Glasgow working on moving their entire code base from windows server 2003 to server 2008 and re-writing the way al off this software was built and packaged using MSBuild and WIX.
From August to the start of November I was back at base which was Pulsion Technology working on various projects.
In mid November I resigned from Pulsion and took a job at my new employers Maclean Electrical in Cumbernauld, where I am now working. Moving jobs after 11 years was a little daunting at first but I am so so glad I made the move.
During the year I have purchased Tekpub and I also have a subscription to Pluralsight training which are both fantastic – I am also a Friend of Redgate and have been looking at their most recent releases which look very interesting indeed.
In 2012 I hope to travel to one of the big conferences at some point as I didn’t travel abroad this year – I also hope to get stuck into RavenDB soon and learn more about Agile and see what else 2012 brings with it.
Thats it folks enjoy 2012!