Saturday, 18 March 2017

Know your frameworks, never stop learning!

Last year, as part of a series of posts, I asked "Are you investing in your own career?". This, in part, came about from a great quote that heard:

Do you have 10 years experience, or 1 year's experience repeated 10 times?

I think the majority of developers starting out are fired up and excited every day. Everything is new, everything is a challenge. Just getting something to work, no matter how, is a success.

It can also be amazingly frustrating and tiring to be constantly learning and actively building your knowledge / skill-set. It's probably not a surprise therefore that it is so easy / appealing to back off a little bit for a break once you have learnt enough to satisfy the day job. Similar to over training in sport, it's probably even a good idea - no one can do anything flat out indefinitely.

But what happens when you just continue backing off? The hard truth is, rather than continuing to build your experience, you do slowly start to fall into the trap of just repeating the same year over again. Yes, in the second year, you feel more productive in that your starting point is higher, but for the most part that's it - you don't really become any more productive or learn anything new over the course of that year.

So what's the solution? I personally think the answer boils down to these two points:

  • Know the frameworks that you are using inside out, and
  • Continue learning new stuff like you're a junior developer again.

If your company / team uses Entity Framework, Angular, 'insert any framework here' then read up about it, try new things to see what else it can do. Maybe even schedule a team hackathon to learn together. But don't stop there, look at the every day stuff you use all the time. Are you just scraping the surface of C#, ObjectiveC/Swift, Java or what ever language you use in your day job? Look at the "What's new" for each release, find blogs, podcasts, etc to help widen your net of information.

Pick something new to learn, maybe native mobile development (if you're a web developer) or a completely new language (F# if you're an accomplished C# dev). Maybe even look at a common time sink in your day to day coding and look to see if there's a new or different framework / methodology that would improve your and your team's productivity.

No matter how many races a runner may have won in the past (and records they've set), if they've stopped putting in the training miles then they should expect to be beaten in a race by someone who is committing the effort and is, therefore, better prepared. Being a developer is no different - but it is our brain, not our legs, that we must be constantly training to stay 'match fit'.

Saturday, 11 March 2017

Accessing a "Class Library (.NET Standard)" from a "Console App (.NET Framework)"

If you're trying to access a class library (.NET Standard) from a traditional console application (in VS2017 those can be found under 'Windows Classic Desktop') you will run into problems; which can feel a little strange for something that was pretty simple in VS2015 and earlier. You can add a reference to the class library project (Resharper will even volunteer to add the dependency / namespace reference if you don't already have it). But the code won't then compile, it will complain that it can't find the namespace referenced in the using and it also won't be able to find any of the objects that you reference in the class library. Took me a bit of figuring out but you need to open up the properties for the class library project, look at the conditional compilation symbols in the build tab (it might be something like 'NETSTANDARD1_4'). You need to take this symbol and duplicate it in the build tab of the console application. You should now be able to rebuild your solution and if you have other code errors, etc the solution should now build.

Saturday, 4 February 2017

Review of Bose QC35 Headphones

Working in software development, a decent pair of headphones is a must. I've lost count of all the pairs that I've owned over the years! I've had some really good wired pairs but they've tended to die an early death when kicking my chair back to scoot across the office to speak with a colleague and forgetting I have them on my head or round my neck. I did try wireless headphones once before, a pair of Sony's but the limited range, background noise, poor battery life and tendency to suffer from interference sadly had them quickly relegated to the cupboard. After trying a pair of QC-25's in the office and being impressed by their sound cancelling functionality I decided to splash out on the (at the time) newly released pair of QC-35's.

So I've had them for a while now and have been meaning to write a review, which fits in nicely with a new year's resolution to update my blog a little more regularly than I've managed over the past couple of years. In a nutshell I love them and whilst I hope that they survive many more years yet, I would replace them with another pair at the drop of a hat if anything was to happen to them. Yes they are expensive, insanely expensive for a pair of headphones but if you use something every day it's probably worth splashing out on getting something amazing.

  • Sound Quality: There is almost no background noise at all and I've yet to suffer any interference from other sources. I'm really happy with the overall sound quality too. Whilst I've not done any technical tests they sound as good or better than any other headphones I've owned.
  • Comfort: For me they've got this spot on, they neither over grip your head nor move around because they're too loose. Most of the time you can almost forget you're wearing them. I wear glasses and some headphones just never fit right or squeeze the glasses into your head and in the worst case start to hurt after an hour or so. I've worn my QC-35's all day and not suffered this problem or got too hot (another common problem of over ear headphones).
  • Wireless Range: I've read several other people saying how amazed they are with this. For Bluetooth the range is amazing, I can walk around our open plan office with no problems. Like wise I can walk around most of my house too, even going between floors. Depending on how many walls / floors the signal has to go through I can get about a 8-10 meter range.
  • Noise Cancelling: This can be so good it's a bit worrying when someone makes you jump as they want to speak to you. We've had building work going on next door to the office and I've only become aware of it as I've taken my headphones off. In fact, the noise was so loud at that point I wondered how any of my team were managing to concentrate / work. For this reason alone, if you need to concentrate in your day job I would suggest you invest in your career by buying a set!
  • Battery life: Never been a problem. I do hook them up to charge on a regular basis but I've never had a point where I've not been able to use them because they've been out of charge / on charge. The battery life is just at the right level that you never need to think about it.
  • Value for money: They are expensive, there's no getting away from that fact. But as I said earlier, if I need to replace them, I would straight away. It's probably fair to say I can't hear a difference between these and a much cheaper (£50-£100) pair of wired headphones, but these are wireless and sound cancelling. They also aid focusing on tasks whilst at work, which for me makes them a worth while investment.

Sunday, 29 January 2017

Why do my Android Notification only appear in the status bar?

I'm definitely getting back into Android development, I'm remembering that feeling of 'Surely this should be easier than this!'. All I wanted to do was to schedule a local notification which behaved similar to a push notification pop-up. That is, as well as showing the small icon in the status bar I wanted it to pop up on screen to notify the end user. All seems fairly easily, I found this code for how to schedule a notification. That all worked perfectly, apart from the notification would only appear in the status bar. Searching around I found loads of different answers / solutions, mostly all saying the same thing:

  • It only worked if you used 'NotificationCompat.Builder' in place of 'Notification.Builder', or
  • You had to set the priority to 'NotificationCompat.PRIORITY_HIGH'

As usually happens, none of these solutions worked for me until I added in the missing piece of the jigsaw:- '.setDefaults(Notification.DEFAULT_ALL)'. For me this fixed the problem, the scheduled notification began to pop up on the desktop as expected! Looking into the Android documentation for this method nothing seemed to make sense as to why it would change the behaviour of the notification. As the documentation made reference to default sounds I replaced the call ".setDefaults(...)" with ".setSound(...)" and tried again. Again, the notification behaved as desired and appeared as a pop-up. Not making calls to either of these methods resulted in the notification reverted back the undesired behaviour of only appearing in the status bar. Adding either or both of these calls back in caused the desired behaviour. I'm still not completely sure why at the moment, but adding a sound to the scheduled notification sorted the problem out for me.

These 'pop-up' notifications are called “Heads-up” notifications and were introduced with Lollipop (v5.0).

Saturday, 14 January 2017

Links for starting out in Android development

A recent discussion at work made me realise that over the past few years learning Android development I've managed to build a short but very useful list of links for starting out. Not a really detailed post this time around, but hopefully these links help at least one person, let me know!

  • Development environment: We started out using Eclipse, but now feel that there is only one IDE to learn, Android Studio 2.x
  • How to documentation: This has always been a big struggle, much of the information that you can find is quickly out of date and potentially incorrect. Luckily a team of volunteers have set up the Codepath Android Cliff-notes as a Github wiki. This team have also recognised the difficulty faced by many starting out with Android development and have put together a list of articles tackling everything to do with Android development and are maintaining that list to ensure it is regularly reviewed / updated to keep it relevant and useful. I really wish I'd found this when I first started out.
  • Training videos: At my company we all have Pluralsight subscriptions (well recommended). I can recommend the course by Sriyank Siddhartha. Again, everything ages with Android really badly so these articles were useful around 2016/7.
  • More detailed videos: The Android development team at Google put together a great YouTube channel. These videos are usually really in depth but require a little more than entry level knowledge to get the most from. Either good to watch to get a feel for what's available or coming back to when you need to tackle a particular problem.

That's all, enjoy learning Android!