BioHive: Bioinformatics blast from the past

July 7, 2016 at 10:30 am (Computer Science, Processing, Programming) (, , , , , , , )


Lately, I’ve been combing through some of my old projects so I can index and archive them. Among these old projects was my BioHive code; a bioinformatics visualization tool I wrote years ago. It was an attempt at exploring genome comparison data sets. It was actually the first non-trivial Processing (P5) app I wrote.

Different genomes would get organized into layers (indexed using colour) and nodes would be joined together based on similarity strength. Thickness of the lines would indicate connection strength, and filters could be applied to reduce clutter. Selecting a node in a layer would show information on the genome it represented as well as the top similar genomes.

These are a few screenshots of the app. In this example, Syphilis is the point of interest and they are just different views of filtered results.

Advertisements

Permalink Leave a Comment

Latest Project: Node.js + Bootstrap + D3

July 3, 2016 at 5:07 pm (Computer Science, JavaScript, NodeJs, Programming, Rant) (, , , , , )


I’ve started putting together an app I’ve been planning for a while. I’ve been trying to select a tech stack that would allow me to focus on the “meat” of my idea instead of spending too much time setting up boilerplate stuff. In the past, I’ve ended up wasting days just setting up technology stacks and libraries just to find a limitation that would eat up even more of my time or even flat-out block further progress. This time around, I think I should be okay; I’ve selected Node.js and Express for my launch point.

I’ve decided not to bother with MEAN.IO right now since I won’t need MongoDB right now and I’ll be using D3 (the visualization library) instead of Angular. Express provides me with the basics for routing and serving web content (more stuff I don’t have to do). I’m still not really a fan of Jade/pug as a template engine, but it’s workable.

I’ve also added an REST API on top of it for accessing my Trello account (via it’s own REST service). I’d like to do some sort of interesting visualization of my content using D3, so now that I can serve up the data I’ll need, I can actually start building the good part.

One of other boilerplate tasks coming up is to set up a client-side package manager (Bower) to manage my dependencies. I will likely also need a task-runner to build my project stuff, although I’d like to consider using NPM for that instead of Gulp/Grunt.

Permalink Leave a Comment

Updates: June 10, 2016

June 10, 2016 at 10:55 am (Art, Java, memory palace, Programming, Rant, Thinking) (, , , , , , , , , , , , )


I’ve been working on a number of different things as well as thinking about my next steps and goals for the year. Here is a point-form list of some of the projects and endeavors I’ve been spending effort on in the past couple weeks:

  • I set up a home Linux server. I wanted a local, private Git repository as well as a machine to host some automated processes and apps. Things have been working out very well on this front. It’s been a great learning experience on top of it as well as I haven’t really used Linux in a decade or more. I installed a desktop version of Ubuntu, but I’ve been sticking to using the terminal as much as possible to expand my sphere of knowledge.
  • I’ve been working on my coding skills and algorithm knowledge. I always have some sort of coding project on the go, but recently I’ve been so focused on my front-end skills that I’ve let my core skills droop a bit. To get back up to par, I’ve been solving a lot of coding problems in Java as well as figuring out some algorithms that I haven’t touched in a while. I decided to start basic with heaps and heapsort, then moved on to KMP string matching, and now I am working on suffix tries/trees. I’m going at a slow pace with this though so I can not only code solutions, but also store them in my mind palace.

   Preparing an algorithm for long-term mind palace storage pretty much consists of tearing the algorithm down to its basic elements in your mind and trying to make a story out of it. For example, I’ve decided to store the KMP string matching algorithm in a kitchen in one of my mind-rooms, so I compared the process to making spaghetti. Comparing noodles of different length was the basis of the story. I also had to work in the generation of the prefix table for the search pattern. For this, I’ve been toying around with adding some sort of “sauce” to the story to indicate the comparisons of the prefix to suffix for each length of the pattern noodle.

   I think that I’m finally starting to outgrow the hub room I’ve been using for my computer science mind palace. It was a good index for classes of algorithms so I could always see what tools were at my disposal, but it’s getting too cluttered now.

  • I’ve also been doing a lot of general-purpose reading. I visited the library not long ago and “accidentally” walked away with between 10-15 books. Some of these were painting-related so I could learn some new techniques and composition skills, but I also picked up some interesting biology books. One of these is a book on viruses (the non-computer version). I’ve been learning a lot about how they operate as well as how they’re being used/manipulated today. Bacteriophages are being produced to one day replace antibiotics, and I find the whole thing fascinating (phages are a type of virus that goes after bacteria instead of humans).
  • In addition to practicing my coding/problem solving skills, I’ve also been working on learning and using some new technologies; at least new to me. I’ve been fiddling with the Play framework, which is a web platform. I wasn’t really impressed with it at the start as you have to use a self-hosted web app just to create a project structure, but beyond that it seems really nifty. My next area of interest within this framework is the Ebean integration, which allows for a fun way to connect objects to databases without having to write scripts and stored procedures. There are also some features to allow syncing a database to ElasticSearch automatically, which will be fun.
  • The Android platform is another area I am learning about lately. I’ve set up my development environment and I’ve been learning about the SDK for creating apps. It seems like there are a lot of different approaches to building Android apps, especially as the SDK has been evolving. It has made things a little awkward to get started (as there are many references on the internet to doing things the “old” ways), but I think I’m past that hurdle now. My only real problem now is that I haven’t been spending enough time on this project.

Permalink Leave a Comment

Progress Update: May 24, 2016

May 24, 2016 at 6:39 pm (Computer Science, Java, Programming, python, Rant) (, , , , , , , )


I know I’ve recently posted about a few of my upcoming goals, but since then I’ve fiddled with a number of things since then and have some updates on my progress.

  • Python Learning. Thanks to a suggestion on the Halihax Slack channel, I picked up a pretty decent IDE for my Python projects (PyCharm). Unfortunately, I learned the hard way that Windows is not the ideal platform for using Python. I wanted to work with a packaged called “sklearn” that I saw during a Google I/O session on machine learning, but it depends on SciPy; a package for scientific calculations. Unfortunately SciPy has some dependencies that do not install cleanly on Windows (LaPack and BLAS are a couple examples). I was really looking forward to toying with the code snippet from the presentation, and I’m sure there are plenty of equivalent libraries I could try out, but the fiddling process wore on me.
  • Android Learning. I’ve been learning about making apps on the Android platform. There was a fair amount of setup and configuration for getting the IDE to work as well as setting up the right emulators to run code on. The annoyances were further compounded by the fact that I don’t want anything installed on my C drive. I use a smaller SSD drive for my C, and then put everything else on another drive; it allows my OS to run lightning fast and lets me get going faster. This guide ended up being really useful in moving the hefty emulators and other odds & ends to my storage drive: http://www.littlecpu.com/android-studio-c-drive.

  I’m in a pretty good “hacking” state right now on this front after some effort. I’m learning about the UI-data model binding within Android page components as well as other architecture aspects. The architecture is fairly straightforward (activities, services, etc) but there seem to be a lot of conventions and gotchas.

  • Java Experiments. I’m also back experimenting with Java as well. I’ve been using Derby (JavaDB) as an embedded database, and it’s pretty simple so far. I had toyed with MapDB a bit, but I’d like something a bit better supported so I can use Hibernate with it to avoid having to do my own schemas. I’ve also been using ElasticSearch in parallel. It’s kind of it’s own document-based database, but without the reliability – it’s usually used in conjunction with a real database and you just sync the data in batches so that Elastic can index the data to make it searchable. These components are all pretty straightforward, but I want to build a decent non-trivial demo project. I was also considering using Akka for the concurrency management to control the batch operations to ES.

Permalink Leave a Comment

Updates: May 2016

May 15, 2016 at 7:03 pm (Computer Science, Java, memory palace, Programming, Rant, Thinking) (, , , , , , , )


It’s been a while since I’ve posted about my recent endeavors outside of painting (this is by design). There’s been a fair amount of things keeping me busy and stressed. That being said, I’ve started putting together and working on my goals for the next several months. A large part of this will be getting my full-stack technical skills back up to a competitive level. I’m going to be focusing mostly on my Java skills as well as commonly-used libraries, since it’s been a while.

As part of this, I spent a bit of time building a small app to back up my development files. Mostly because I needed a good, automated process and didn’t want to go shopping for an app. I needed something that can backup different sets of files at different times, so I could selectively backup specific projects and images, but also my full dev repository. It seems to be working according to my tests, but I’ll be trying it out soon to find out.

I also plan on picking up Python. I think I will use Python 3, although I want to be knowledgeable of the differences from 2 to 3 as well so I can read/port existing code. It shouldn’t take long to pick it up, but I have to learn the specific syntax and rules such as scoping, etc. Some sort of project would help, so I’ll be trying to think of more home automation tasks I could fulfill with Python apps.

Lastly (for this post), I plan on giving my memory palace an upgrade. I need some more rooms, and I need to finish storing algorithms in it. I’m missing tree and graph algorithms (which are pretty important), and I wouldn’t mind adding some more details for implementation as well. This should ensure that I don’t have to review algorithms, data structures, and design patterns when I need to use them; I’ll have them permanently stored.

Permalink Leave a Comment

Update on Activities: June 8, 2015

June 8, 2015 at 2:58 pm (Computer Science, Programming, Rant, Thinking) (, , , , )


So I had somebody remind me that I haven’t posted anything in a while here. It hit me that it’s been months since I’ve posted an update on what I’ve been up to so I might as well write a few things down. I’ve actually been keeping myself very busy with a number of non-programming projects, so I’ll post a few things.

One of the main things that’s been taking up my time lately is that I’ve been trying to improve my brain. To do this, I’ve been using some software on and off to try and improve my working memory. It’s based on some research called the “dual n-back” test; essentially you’re testes on how many previous numbers you can remember as well as where the numbers were displayed on a 3×3 grid. I believe there has been mixed feedback in the reproducibility of this work as well as its transference to other areas of activity. This means that people aren’t 100% sure that doing well at this test will help you do other things.

In addition to this, I’ve been reading a ton of books from my local library. I believe a week or two ago I hit a point where I had 22 books signed out at one time on a wide variety of subjects. Part of my strategy of being able to read all of these books is that 3-4 of them are books on speed reading. I honestly still can’t believe how much faster it has made me while being able to consciously remember everything I’m reading. I’ve traditionally had attention problems while reading and have gotten used to the lines of text moving around on the page. These techniques have definitely helped me worth this problem.

My last update for today is that I’ve been taking a bigger interest in my career. This has been a theme of the past year as I’ve turned my “normal” job into half of the things I do at work. I’ve been taking on new responsibilities and being more proactive about what I do. For example, this past week I started writing a newsletter for my product’s team to keep them informed on big sales and customer use-cases. This is somewhat of a small thing, but as I keep my ear to the ground at my company for useful information, I saw a need that wasn’t being met by anybody else and opted to fill it.

On a final note, I’ve been keeping better track of all of the interesting things I’ve been doing voluntarily. So I hope to remember to post here more often on what I can (I’m sure there are some things I can’t share for confidentiality reasons).

Permalink 1 Comment

Video: Second demo for my game

April 3, 2015 at 3:38 pm (Game Development, Games, Processing, Programming, Video games) (, , , , )


I’ve finally gotten around to making a video recording of my new game demo! Part of my problem was finding a suitable video capture software suite. I ended up using Open Broadcaster Software, and it turned out fine; I WAS using KRUT, but it had issues with the audio capture.

Anyway, while recording it I ended up finding out that half of my rooms didn’t make it into the demo! I had an issue where a locked door led straight to the boss level. That kind of sucked. Here’s the video though:

Permalink 1 Comment

Update Mar 12, 2015: New game demo, mind palaces, and notebooks

March 12, 2015 at 1:29 pm (Game Development, Games, Processing, Thinking) (, , , , , , , , )


It’s been a while again since I’ve posted here, but I haven’t been idle in this period of time. I don’t think I can list all of the things I’ve been up to, but here are three things I’ve been up to:

New Game Demo

I’ve recently released (privately) a new demo for my game. It features brand new levels, mechanics, and storyline. I’ve even added new tilesets and original music for the levels. With the last demo, I was happy to have something playable that resembled a game and showed off some of the neat things I’ve built, but this time I think I’m actually content with it as a game. I’ve added some dialogue that needs a bit of polishing, but is roughly what I want it to be as well. I still need to post screenshots and a video, but I need a big chunk of time to do that still.

The first person to play-test it and give feedback made me pretty happy. It seems that they felt what I wanted them to feel and thought what I wanted them to think with respect to the storyline. They noticed some of the extra details I put into the levels (like the rain effect) as well. One thing I took away though, was that they didn’t use the camera mechanic at all. I think I might add some HUD cues and mechanics to encourage the usage of it.

 Mind Palace

I’ve been spending a considerable amount of time lately rebuilding my “Mind Palace”. This is a mental tool that utilizes the “Method of Loci” method for memorization. Essentially it’s a superior way to reliably remember things. It takes a bit of effort to set up and upkeep, but if done correctly, you can do wonderful things with it.

Before, I was building the hub structure of my palace based on something I had imagined. My problem was that I never fully constructed it; I wasn’t sure how big of a space I needed, so it deteriorated over time faster. I can still reference most of the rooms, but I didn’t solidify where everything was enough.

Also, I didn’t have enough connections to well-known places. Examples of these are houses I’ve previous lived in, These are useful as you can typically just imagine yourself moving through those places and then have your memories jump out at you. My next goal is to tie in more of those to my “hub area” so that I can jump from location to location without having to remember how many houses I’ve lived in. It probably would look like that hallway in one of the Matrix sequels that had all the doors leading to difference places.

 Notebooks

Soooo, it turns out I am a crazy person? I used to have decision issues when it would come to notebooks. I remember being in a store for 10 minutes trying to decide what colour I wanted to use for a notebook. I ended up just buying all of them so that I could decide in a non-public place. Recently, Target has gone out of business in Canada due to questionable decision making. The good part of this is that Moleskine notebooks have gone on sale; at the time I purchased them, the discount was 30% off. I rarely notice these going on sale, and since I’ve started using them almost exclusively, it seemed like a great idea! However, now I have a drawer full of different sizes of notebooks and my mind will only let me use certain notebooks for certain purposes. I’m happy to not have to go buy more for a while, but now I have to store a ton of notebooks…

 

Permalink Leave a Comment

Zombie Mansion with shaders and post-processing

January 22, 2015 at 9:03 am (Game Development, Graphics, Java, Processing) (, , )


Update: Full project description here

I finally got around to retrofitting my older projects with the new hotness. I am now rendering the scenes with shader programs, which gives me a lot of nice options for how the scenes look. I can do lots of fancy stuff with them including doing neat things to the screen after the scene has been drawn. Here’s a quick example of one of the things I’ve already tried. It’s a ripple effect I applied to the screen; it looked awful, but I was getting 60 frames per second with it (which is good).

jan17_2015_screen effect gone wrong1

Permalink Leave a Comment

Project: DarkWolf2D (2D Dungeon Crawler)

January 10, 2015 at 4:30 pm (Game Development, Games, Graphics, Java, Processing, Programming, Rant, Uncategorized, Video games) (, , , , , , , , )


Over the holidays, I had some time to upgrade the core code for my game engine. I’ve upgraded the version of Processing that I use as well, which means I can use shaders for rendering along with some of the nicer JSON loading features. While I have a “version 2” of my engine working though, I haven’t yet retro-fitted it into my Zombie Mansion yet. This is coming in the future, but for “proof” that my code works, I’ve been putting together a small game based on a design I had in a dream. It’s the “basic” version of the idea, which means no multiplayer and no nice graphics.

The idea is for a dungeon crawler action game that takes ideas from the MOBA genre. I know how it sounds, but it’s actually a very basic idea and it’s already half built. It’s a player-vs-environment game right now where the player begins at level 1 for each dungeon and has to level up as they progress to bosses. The theme for it is an alternate history WW2 where the characters are different classes such as “US Medic”, “Russian Sniper”, or “French Resistance Fighter”. Each class has a basic attack and a list of abilities they can level up and use. I’m keeping the XP system as simple as I can (although I’ve never built one before), and I’m not using any items for the game right now.

For rendering, it’s a 2D game with no character animations; just a static side-shot image. This should keep the dev cycle pretty low for now. I also have a feature backlog that I’m considering making public, but for now I’ll only do that if I have anyone comment that they actually care to look at it. It’s a list of all the features that I plan on implementing (some are basic things like “add audio to the game”, and it functions as my “todo” list. As I build in features, I mark them as “Complete” and they shuffle to the bottom of the list for storage.

Edit: Added a screenshot. It’s very basic and you can’t really see anything worthwhile. Just showing that I can at least render the player in a level. I’ll make a video later.

First screenshot of DarkWolf2D

First screenshot of DarkWolf2D

 

Permalink Leave a Comment

Next page »