Daniel's Stuff

I write code

Category: Uncategorized

Apps

I’ve been making some apps recently.  One for the new Windows 8 modern UI and one for iOS using swift.  One was a joy to code, the other was not 😉

Swift is an interesting language and I look forward to writing more code in it.  C# is also a nice language, however writing code for “modern” Windows apps is much harder than it should be.  This is mainly because many of the more useful parts of the .Net API just are available any more 🙁  No System.Data was the real problem for me and meant that I had to roll my own database access layer on top of a SQLite database.  An app that should have taken a couple of days to whip up took a couple of weeks.  Every time I thought I was getting somewhere I would hit yet another assembly or class that wasn’t available, or worked slightly differently to the “normal” way things should work.

Both apps are working now, so I’m happy 🙂

It’s alive!

I spent a little time on my lunch break putting in the last few wires and the board has come up 🙂

The flash from my phone has drowned out the LEDs on the board, but they were blinking as they should.

Since I didn’t have another voltage regulator handy I have used the voltage drop across two diodes from a bridge rectifier (a trick I’ve used successfully before with other 3.3v parts from Microchip).

Toilets

Over the weekend I replaced the leaking inlet valve of our toilet. What should have been a 5 minute job took a couple of days as whoever installed it in the first place glued the nut joining the inlet pipe to the inlet valve. This meant that I had to cut the inlet valve out once I had managed to snap things off badly inside the cistern. No going back once I had snapped a couple of the plastic bits on the inside. Once I got it out I was able to replace it in a matter of minutes 🙂

SVG

I’ve been looking into making some software with my daughter.  She wants to make a game with some characters she has drawn, so I need a nice way to render them.  I want to make them using vector graphics, but iOS doesn’t really have a nice way of doing that.  What I am in the process of doing is making a little command line tool that converts SVG files into CoreGraphics calls.

The code can be found here on github
This is a sample of the output of the tool.  I have seen several other tools that convert the SVG paths to CoreGraphics calls, but nothing that will actually render the whole file including colours and fills.  It is still very rough and doesn’t handle things like gradient fills, but for a quick hack it is working pretty well.

It is alive again

I got another email from the awesome tech support guys at Drobo this morning asking about my DroboPro. I told them it had died again and they offered to replace it rather cheaply, they also suggested that both batteries might need to be replaced rather than just the CR2032 coin cell. I removed the main backup battery pack and pressed the power button and the thing booted up. I’m not shutting the thing down again until I’m sure I’ve got ALL of the data this time 😉

Looks like it is dead again

I spoke too soon. I rebooted the box to get it to enable iSCSI to allow for a faster transfer and it hasn’t come back to life again 🙁
At least I managed to get the one thing I didn’t have a backup copy of off the unit, so I’m pretty much good to go on my rebuild using a simple beige box.

My DroboPro just died :(

It is almost 4 years old, so it has served me reasonably well. I have backups of most of the data, but there may be some things I have lost. Ah well. I’ve been wanting to open the thing up and have a look inside for a while now. They are quite nicely built I have to say. It is all back together at the moment, but I’ll probably rip it to bits again and take some pictures.