My Daily Journal

Daily Journal - Start of Month View

For my birthday this year I asked for a Notebook, among other things. But I was really looking forward to getting a new notebook as I was itching to get started on using a paper based markup system for keeping up with things, and adding more order to my already order systems. I already had a notebook I used near daily at work for keep notes, tasks, etc. But after seeing the Paper Based Markup System post over at The Cramped, I realised I was not alone on have various items to keep notes, tasks, etc.

The next month start after my birthday I had decided that I would open up my new notebook and stick to a routine of my own version of some of the system’s show in the different system on the post Paper Based Markup System seen on The Cramped.

This was three months ago, and I have been using it on a near daily basis, for tracking tasks needed done this month, week, day. Taking meeting notes, and general notes. So here is how I am using a paper based markup

  • I have a contents page that lists the Months and the page numbers of start and end pages for the month.

Months

  • At the start of each month I have two pages with are two facing pages (notebook opens flat – blank left and right page) where I put the month day list on the left, and my months task list on the right
  • On the left page I use the list of days to block out important items, trips, travel, big deadlines, holidays, etc
  • On the right page is a list of things I wish to achieve this month. Each month I check last months items and bring them forward if not complete.

Days

  • During the month the pages can vary depending on the day, and what’s happening during the day(s).
  • Most days I use a new page to write down my todo list for the day. I start each day with the full date of the day (Tuesday 23rd September 2014). Then I write out my list of items in order I wish to tackle them.
    • Rather than use bullet points I use squares this allows me to tick them off,
    • highlight meetings with a clock icon and put the time in square brackets.
    • You exclamation marks to show important items, that are urgent, or need done ASAP.

Meetings

For meetings I start with a blank page and have:

  • Full date (Monday 29th September 2014) in the top left
  • On the right I have the time of the meeting (including the timezone) and a clock icon (so when browsing through my notebook I can easily distinguish the meeting notes apart from a normal page)
  • Below those two items, I have the the meeting title/agenda
  • Then a list of attendees, for any attendees that don’t show I put a line through their name

After the above is on the page I will start to take notes using the same ideas as my day pages, using square next to items that I know need done, clock icon next to items that have time related parts, and then at the bottom any follow up items, or additional planned meeting related to the current one.

Over the past few months, I have managed to keep a consistent output, and have tweaked my style as I go along, I am sure I’ll tweak it a little more over time as I think of different ways to document items.

Gigaw.at: Back from the future

Gigaw.at

A week ago, I had an email about a domain name due to expire, which got me thinking, then two days ago I wrote a blog post about open sourcing more of my web apps that I have built and are sat lying on my computer.

Today, I open sourced my first web app: Gigaw.at.

Gigawat was a web app that I had built nearly two years ago, and I was running it for a good time on it’s own VPS with separate database server, and them over time it sort of dwindled out, and was not very active, and it was costing me each month with very little reward (personally), so I closed it down and decided to save my money and put into other projects. As per my blog post the other day, I want to bring some of my web apps back to life, and have a history of the code I’ve written.

I decided that gigaw.at would be my first web app to be open sourced as I knew it was in a pretty good state and was able to run with very little work… I did say little work, which turned out to be wrong as I decided to adjust a couple of things, I also removed a couple of features. This meant that I could spend more time working out how to use heroku and get it all up and running. Which was very simple, just a few kinks to work out, which was mainly the config settings to ensure I did not commit any sensitive information.

So, gigaw.at is on my github, under a GPL3 license, and it’s now back up and running over at heroku, and using compose as my mongoDB provider. Feel free to grab the code, and play around (note it’s made using OpenBD, and I need to write up a readme for information on how to get running)

Time to Open Source

On Saturday I tweetwed:

And since then I’ve been thinking about all the projects I have ideas for be it not started, half started, finished but not online anywhere, and what I could do with these. I don’t want them to just disappear. So I have been thinking about what I can do with these, generally they are very lightweight and will not see great demand, but all these projects will soon start to cost me a small fortune to keep running on servers, and I don’t want them to just sit on my computer without people seeing them.

So! I have decided that I will be Open Sourcing many more of my projects, these will be going on to my GitHub account, and I will be using Heroku to put up these projects, this way people can see the code and interact with them.

I have started playing with Heroku and am in the middle of understanding how to use it, my next step is to get my apps ready to run on Heroku, I need to ensure I don’t commit any sensitive credentials to GitHub.

By releasing my code and apps it may help someone out with an issue, but maybe not. Another good thing for me doing this is I can have a history of a lot of the code I have written, I am forever going back to projects to grab snippets of code.

Basic image resizing with nginx

So I came across an nginx module (ngx_http_image_filter_module) that would allow you to resize, crop and compress images before sending them back to the user. This allowing you to create a simple image parsing server. After some reading I wanted to have a play around with this to see what it could do, and if it was something I could use, or something we could use a work.

A couple of requirements I had before I started was I want it to be able to do the following:

  1. Handle resize of images based on the user agent without having to change URL’s on the fly or with JavaScript. eg. server.com/test.jpg – Should return different sized images based on the user agent. (360px wide for iPhone, and 460px wide for Android)
  2. Handle general resizing based on a URL string eg. server.com/resize/400×400/test.jpg

Not many requirements to start with, but over time I’ll adjust these and play more with nginx but this is enough to play around with and see what’s possible with it.

I got started by spinning up a 512Mb Droplet from Digital Ocean, and installed nginx using yum (you can see a tutorial on Digital Ocean if you need to), then I spent the rest of the time tweaking the conf file (/etc/nginx/conf.d/default.conf). See below for example of what I’ve added to the default.conf file.

Here’s the part of my nginx config that’s doing all the magic:

  location ~ /resize/([\d-]+)x([\d-]+)/(.*) {
     proxy_pass                  http://$server_addr/images/$3;
     image_filter                resize $1 $2;
     image_filter_jpeg_quality   80;
     image_filter_buffer         10M;
  }

  location ~ /(.*) {
     try_files                   /$1 @img;
  }

  location @img {
     if ( $http_user_agent ~ iPhone ) {
        proxy_pass              http://$server_addr/resize/360x-$uri;
     }

     if ( $http_user_agent ~ Android ) {
        proxy_pass              http://$server_addr/resize/460x-$uri;
     }

     proxy_pass http://$server_addr/images$uri;
 }

So, that’s the technically part and some waffle from me. Here’s the demo: Image Demo Page. as you’ll see if you visit the page you’ll not notice anything different, try visiting it on your iPhone, or Android device and look at the image quality. The other way to do it, is if you use Chrome, you can spoof your user agent (I’ve wrote about that before). Also you can see the following URL’s and their outputs:

  • http://i.matthewroach.me/test.jpg – Will request the test.jpg image, and return it as is. But if you are on an iPhone you will get a image resized to the max width of 360px, or if you are on an Android device it will return the image at 460px wide
  • http://i.matthewroach.me/resize/523×400/test.jpg – Will return the image scaled to 523px wide and the height will be proportionally to the width. Try changing the 523 value and see what happens!

So, I have just touched the basics here, and I am looking into more advanced things that it can do and see how far I can take it and if it’s a viable solution for a production environment.

Review: Amazon Kindle – Sleeve

Kindle Sleeve with Kindle inside

After getting myself a Kindle Paperwhite, I was in the market for a nice case to protect it. With things like cases I have a odd taste and I am very picky in what I want.

Kindle Sleeve closedI began my search straight after getting the Kindle and it took a good while for me to finally hit the purchase button on a case I would want. An issue here is that buying online takes me longer as I can not tell 100% if it is what I want, I would much prefer going into a physical store to by something like this. (I’ll leave those details are for another day)

So after finally hitting the purchase button for this case I was still not 100% if it was going to be right or any good. Once I had took delivery of it, I was quite surprised by the quality of the product. I also got a little shock as I thought I was buying just a plain sleeve, but it turned out the strap that goes over it goes in at the back and loops round inside the sleeve. This is used to Kindle Sleeve showing inside strappull the kindle out, rather than having to stretch the sleeve to reach in to get your kindle out. I was a little sceptically at this, as I was after a plain bog standard sleeve. But after some use of the sleeve in a variety of different situations I am very impressed by this little feature, while I say it’s a little feature, its a huge part of the sleeve. I can see how this will help prolong the lift of the sleeve, as I’ll not need to stretch it open to reach for the kindle, a gentle pull up on the tab and it slides up with no resistance at all.

 

Hatching Twitter

Hatching Twitter Book CoverHatching Twitter: Nick Bilton – I would call myself a bit of a Twitter addict/nerd. I love the service, and the power of it, not everyone understands the system and to me it’s still finding it’s feet in a very tech heavy world, but it’s starting to break through and show what it’s capable of. Having a soft spot for the service made this a great book for me to read, and it did not disappoint.

This books is not about Twitter as a product, but more on how Twitter was born and the struggles along the way of the four co-founders (Noah Glass, Jack Dorsey, Biz Stone, Ev Williams). The books is a focus on these four co-founders and goes into details of each of their part of the creation/ upbringing of Twitter as a tech start up and into a public company. The author Nick Bilton has had a great deal of access to the current and former Twitter staff, investors, and board, in order to put together such detail.

While this books reveals a lot of details you will never of heard about the early stages of Twitter, and the people involved, it may be enough for some readers to make judgement on the four co-founders, but to me it’s still missing a bit of information to make those judgements. As people say, business is very cruel, and this is a great insight in how a business conceived betweens friends can turn into a nightmare and each person thinking they are being treated unfairly. This may put some people of trying to create a business between friends.

On top of the backgrounds and the struggles between the four co-founders the books also gives you a glimpse into the world of the tech start up world (The whole “Silicon Valley” bubble), it has some very interesting parts to it, while this may not be how all start-ups are in there early stages, it could put a lot of people off trying to do a start up. While it may put some people off, it may also just cement the details of what goes on in a tech start-up in their early stages. While this is not the main focus on the book, I found it very interesting and wondered about what it was like for other tech companies that are a huge success now in their early stages. (We obviously know about Facebook form the movie “The Social Network”, but I would quite like to read more about this sort of stuff).

The Climb: The Autobiography

The Climb: The Autobiography

The Climb: The Autobiography by Chris Froome the 2013 Winner of the Tour de France gives a great insight to his back story and how he was not an over night success at winning the Tour de France. Being an avid cycling fan and having been very involved with the sport at young age, I still follow along with great interest. Some people, even myself may have wondered where did this Chris Froome come from? and how did he win podium at the Vuelta, then go on to win the 100th edition of the most famous bike race int he world!

This book gives a great and deep insight into this. Not having the most conventional upbringing that you would expect of a British person. The highs and lows of Chris being brought up in Kenya, and eventually making the switch to become a British rider and give up his roots of Kenya to be able to get the highest possible level in cycling is told in great depth, and gives insight into the struggles of what non european athletes have to contend with.

Another great insight this books gives you is the hard work that Chris has put in to get where he is, some people may think that Chris all of sudden came from nowhere to finish second in the Vuelta, then to stand on podium twice at the Tour de France, with one of being the top stop.

I recommend reading this book if you are anyway interested in cycling, or if you are unsure of the cycling scene post “Armstrong” era.

Amazon Kindle Paperwhite

I finally got a kindle e-reader. I decide to go for the Amazon Kindle Paperwhite, I have had my eye on the paperwhite since the adverts for them appeared on the television before Christmas last year (2013) and I had made a few passing comments while my wife was around that I think I would quite like of them. But me being me, I like to take my time over working out if I wish to actually purchase a gadget of such a price (it can take me weeks to decided on purchasing something, after all the researching, looking around, going to stores to try them, etc). After much thinking about the paperwhite I had made my mind up that while they are a great gadget, it was not for me. A couple of reasons for this is:

  1. I have an ever growing collection of paper books that never get read, so would the kindle change this?
  2. I am not a huge reader and it can take me month to finish a book, so it seems pointless to waste that sort of money on the kindle
  3. Do I actually need one?

With those points in mind, I had made my mind up that I did not need one. I tried reacting my words to avoid my wife purchasing one for Christmas, but I had left it a bit late to avoid that. Turns out my wife had already purchased me one for Christmas. After some discussion it was decided that she would return it. Fast forward 8 months, and like I said at the start, I have now got myself a kindle e-reader, and it’s probably the best tech gadget buy for a long time. I’ve always had a thing with books, I really enjoy reading one, but for some reason I really struggle to finish them.

There a couple of things I struggle with when using the kindle, and hopefully I’ll grow out of them over. As it’s a very similar feeling to holding a tablet I find myself trying to do touch screen gestures on it, like scrolling the page to read, and swiping my finger to move page. I sometimes think it may be a better experience if these gestures where implemented, but with it trying to replace a book I am not sure it’s right for the device/ experience.

I would strongly recommend the Kindle Paperwhite to anyone who has their doubts about it. I know it has tons of features, that I’ve not even explored, but the reading experience is second to none, and it’s got me back into reading.

URLrewrite with OpenBD

I love a good clean URL, and recently I decided that I wanted to clean up the way I was handling URLs in my web apps. while this is easily achieved using say nginx or apache, or which ever server you are using. I had a unique requirement that I wanted to be able to handle the rewrites locally without having to have to install nginx or something on top of what I was already using. Also I did not want to have a separate server config to maintain. I was after a way I could have the settings checked in with the web application code so it would work on the server and locally.

Locally I am developing using jettydesktop launcher, and I deploy to a server that’s running jetty, while I could have jetty handle it, it would mean loosing the ability to test locally easily by having the settings within the web app.

After some research and looking around I came across UrlRewriteFilter this is a jar file that can be dropped into the lib directory, a small update to the web.xml file to ensure its loaded. Then you have a configuration file where you can set up all your URL rewrites. The details are shown on the UrlRewriteFilter website, and it’s was a relativity painless to get up and running. But I did run into a small issue. After using the base config and it was all working with that correctly, I applied the changes I wanted for it to work for my web app, and I was getting lots of java string overflow errors. Some Googl’ing around lead me no further, so it became process of elimination to get it working.

The default config for the web.xml is

<filter>
    <filter-name>UrlRewriteFilter</filter-name>
    <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>UrlRewriteFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>

But for me to remove the error’s I was seeing I had to remove the <dispatcher> lines to give me the following config:

<filter>
    <filter-name>UrlRewriteFilter</filter-name>
    <filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>
<filter-mapping>
    <filter-name>UrlRewriteFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

After restarting jetty all was good. Few  more test’s and then I released it to my web server, and all seems to be working.

This jar file is now part of my base web app structure that I use for all new web apps, and I’ll be updating my other apps soon.

Twitter Cards for HillVall.eu

I’ve had this little idea in my head for a while now, on how I could use Twitter Cards to display the content I am sharing from HillVall.eu in a much more rich way on twitter, but without taking the user away from the original website.

The idea is that I want to share a link to an article, blog post, review, or what ever I happen to find interesting from the RSS reader application I have written (still in private beta), but I don’t want to handle the traffic or take user’s away from the real website where the information is. I always want to push the traffic to the original source. Which is fine, but when twitter released their twitter cards for tweets, I was interesting if there was a way I could use them with sharing from HillVall.eu but without handling the traffic like I mentioned before. Plus another reason for this is so I have a reason to look at the twitter analytic’s.

So tonight I set about implementing it, and to my surprise it was relative easy once I had work out what twitter was doing to get the card information.

As you can see from my tweet below when I share something from HillVall.eu it will have a summary card in the expanded display and drive traffic directly to the original website.

For the time being I am only using the summary card, but over time I will look into a way of using the other twitter cards depending on the type of content being shared, guess I can put that doing on the feature list for launch.