7c0h

Articles tagged with "development"

Untitled Bash blog - source code is now online

As I mentioned before, I have now replaced my blogging engine with Pelican. Now that I'm mostly done dealing with ensuring that everything behaves more-or-less as before, it's time to talk about Bash.

I don't really remember why I wanted to write my blog using Bash. In general, I think it was a combination of the following factors:

  • I didn't want to install PHP. I have way too many memories of script-kiddies constantly probing my server, and that was never fun. Sure, I keep my server up-to-date, but why risking it? The less entry points for wannabe crackers, the better.
  • I didn't really thought it would be possible. Sure, writing it at first was kind of fun, but once I started writing triple-nested-quotes (all of which needed to be escaped properly) things got weird. I probably should have called it a day at that point, but I was close enough to my goal to make it worth it to continue till the end.
  • It was a good conversation starter - if you want to get a conversation rolling, bringing your terrible idea up is not the worst way to do it.

Of course, just because it was not the right tool for the job it doesn't mean that it was that bad. If anything, once I accepted that the heavy lifting should be made in a "proper" programming language (in this case, perl), using Bash to glue everything together worked surprisingly well.

With all of that in mind, I have now finally published the source code. I also plan on some light editing to make it friendlier, and an installation guide in case you really want to blog in a system where you have no permissions to install anything. The current template (just as my current blog) is based on Yahoo's Pure.css library library. In case you're not familiar with it, Pure.css is a set of CSS modules to make your project look good and responsive without a lot of effort, similarly to that other library whose name escapes me right now Bootstrap. I chose it specifically because I like to explore alternatives to the most popular projects, and Pure.css ended up being one of my favorites.

I am an idiot (a Windows Phone development story)

I was warned. I was told this wasn't a good idea. I mean, even the price should have pointed out that something was not what it seemed. But no, I had to go ahead. I had to be cooler than the other guys, and I was certainly going to prove everyone that you can't go wrong with a Nokia phone. So I got myself a Windows Phone 8.1 (again), and today I say to you, that was a stupid choice and I'm stupid for going with it.

I've chronicled in a previous blog^1 how much of a pain it was to try to develop for a Windows Phone (WP). That alone should have kept me away from buying a smartphone with a too-good-to-be-true price. But on I went, tricked by memories of me saying "this is not so bad after all", carefully ignoring that I only said that before I tried to write my own app. And here we are again.

This is, step by step, what my experience trying to develop a very simple app for my (Lumia 530) Windows Phone was like. Yours might vary, of course, but I'm not betting on it.

  1. Install Visual Studio Community 2015 (free), following the Official WP develop guidelines
    Problem: all versions that could work in Windows 7 (the one I have) are deprecated for WP development one way or another: they don't have required tools, cannot be activated because the servers are gone, or just won't work. So get Windows 10 and that comes bundled with itwant it or not, and try again.

  2. Update your Windows and Install Visual Studio Community 2015 (free), following the official WP develop guidelines
    Problem: the installer doesn't actually install the WP tools. Go back to the installer and modify your requirements.

  3. Plug your phone to enable development
    Problem: you need to unlock your phone first.

  4. Sign up to Microsoft's Dev Network to register as a developer to get your phone unlocked
    Problem: you need to pay €14, because reasons.

3.1 (Optional) Sign up on Dreamspark as a student to get a free developer account
Problem: the automatic verification process is broken. You need instead to send a copy of your ID, your student ID, and a transcript of your grades to Microsoft over unencrypted email. But don't worry, this data will be destroyed after they use it. "Anna" promised me so over email.

  1. Start Visual Studio, create your first project, and add a couple text fields
    Problem: bugs! The auto-complete is buggy, running my app once would force me to restart every time, and adding a control on the GUI while the text cursor is in the wrong place can (and will) erase every other control. But hey, at least we are finally developing something.

  2. Add a "select date" field to your project
    Problem: you need the DatePicker control to do this, but it's not included - I guess people don't select dates in phone apps. You have to follow several steps to get it working. However, as there's a library incompatibility somewhere, you'll get stuck anyway.

If you have been following all the steps you'll notice that, after several GiB of downloads and a lot of hours spent on internet forums, I have not yet managed to finish the first screen. I spent three days trying to get things running, which is the time I budgeted for the whole app, I'm out €14, and yet I haven't even managed to add a control that should have been there anyway. I also gave Microsoft quite some money, along with a lot of my personal information.

But the worst part is that I knew this is what development would be like, and yet I insisted on giving it another try. This is why I'm an idiot, and if you think your experience will be any better, it is my opinion that you are deluding yourself too.

Listen to my advice, dear reader: Windows Phone? Not even once.

Footnotes

^1 As of now I haven't restored the backup anywhere, but once I do you should see a link to that post here.