simon-hofmann.org

Welcome to my mind.
Watch your step, it's a bit messy around here!

The Road To PWA - Part 3

• PWA and JS

This post is part of a multi-part series on progressive web apps (PWAs).

  1. Mobile First Design, Web App Manifest
  2. Intro to Service Workers
  3. Service Worker Caching (you’re here)
  4. Caching Dynamic Content (when it’s done…)
  5. Offline Synchronisation (when it’s done…)
  6. Push Notifications (when it’s done…)

The story continues…

Now that we’ve found out what service workers are capable of, it’s time to actually use them.

The thing we’re going to use it for is *drum-roll* CACHING! Caching allows our app to run even when our users are offline, which is one of the key features of a progressive web app.

So, we’re going to talk about the following in this post:

The Road To PWA - Part 2

• PWA and JS

This post is part of a multi-part series on progressive web apps (PWAs).

  1. Mobile First Design, Web App Manifest
  2. Intro to Service Workers (you’re here)
  3. Service Worker Caching
  4. Caching Dynamic Content (when it’s done…)
  5. Offline Synchronisation (when it’s done…)
  6. Push Notifications (when it’s done…)

Here we go again!

Welcome back to the second part of The Road To PWA. If you’re new around here, you can find my first post here.

To start off, I’ll summarize the main features of a PWA once more:

  1. Installable: Use a web app from your homescreen
  2. Faster loading: Improved loading due to caching
  3. Offline capable: Even with no connection, my app should work to some extent
  4. Progressivity: Mentioned features are opt-in, the app should work just fine in unsupportive browsers

All elements in this list have one thing in common: They’re in some way relying on service workers.

So, as you might have already guessed, we’re going to learn quite a bit about service workers:

I think this sounds quite interesting, so let’s get going!

The Road To PWA - Part 1

• PWA and JS

This post is part of a multi-part series on progressive web apps (PWAs).

  1. Mobile First Design, Web App Manifest (you’re here)
  2. Intro to Service Workers
  3. Service Worker Caching
  4. Caching Dynamic Content (when it’s done…)
  5. Offline Synchronisation (when it’s done…)
  6. Push Notifications (when it’s done…)

As I said in my last post, I’ve built a PWA for my wedding. In this post I also promised to write a more in-depth post about the technical details of my PWA.

So …

Promise.resolve(writeBlogPost()).then(post => readBlog(post));

wddng - A wedding with tech support

• Fullstack, PWA, JS, Python, and Flask

It might earn me the “Nerd of the month” prize, but I want to tell you how (and why) I built a PWA for my own wedding. :)

Kotlin + TornadoFX + OpenCV = Fun!

• Kotlin, TornadoFX, OpenCV, and JVM

Intro

A few years ago I came up with a funny project idea which involves some GUI programming combined with some computer vision algorithms. Unfortunately, I didn’t have enough time back then to get started with the project and forgot about it.

I wouldn’t say I’ve got any more time right now, but I’ve started to play around with Kotlin and discovered TornadoFX, a JavaFX framework for Kotlin. Since it’s possible to write OpenCV applications which integrate with JavaFX, and Kotlin seamlessly integrates with Java, I’ve been eager to try to write some image processing code with OpenCV Java and TornadoFX.

While I made my first steps, I suddenly remembered my old project idea and decided to pick it up again.

Since I’m still learning both Kotlin and TornadoFX, I’ll be trying to figure out things more than once. But if you’re interested in Kotlin, TornadoFX and OpenCV, keep on reading.

CV CD Pipeline - How My CV is Built and Distributed

• CV, Docker, LaTeX, CD, and Pipeline

Preface:

This is another part of an everlasting story in which someone, somewhere, thinks that the task at hand might better be automated.

Automate all the things!

Spoiler:

Currently I’m on par with my efforts, but you’re invited to keep on reading!

Shipping containers

• XMPP, Jabber, Docker, and Container

Containers, containers everywhere!

Modern software development is going crazy about containers.

They have definitely changed the way we ship software and as an up-to-date developer it is inevitable to hear about, read about or work with container technology.

When I played around with containers for the first time, an immediate thought came to my mind:

Containers would be perfect to use on my server!

Running each component on my server in its own isolated environment, including configs and data, would keep the actual server clean and its components portable. Build your configured Docker image once and it’s ready to run on any server (running Docker).

After my brother and a friend of mine convinced me that I totally needed to run my own XMPP server, I decided that this would be the perfect thing to put in a container.

Containering my XMPP server taught me a lot about the practical use of Docker, so if you’re interested, keep on reading!

Learning by Doing

• Dart, Flutter, Java, Spring, Mobile, and Backend

Learning by Doing

I’m always trying to keep up and running with new technology. One thing I discovered a while ago is Flutter, a framework for cross-platform mobile development.

On the other hand, I’d like to become more comfortable with things I already know. In this particular case I’m trying to deepen my knowledge in Spring Boot.

Putting both things together provides a solid base for a spare time project. So I’ll try to keep on developing a note taking app over the next few weeks. It should allow users to add simple notes with a title and a text on their mobile, with a nice user interface which allows to easily add / delete / archive entries.

All this should be done with Flutter, allowing the note app to run on Android and iOS. Notes should be synced to a back-end written in Spring Boot, an easy way to implement back-ends in Java.

I’ll start with implementing the back-end first and move on to front-end afterwards, so if I got you interesed, keep on coming!

So long

Simon

Zur Verbesserung unseres Prozesses...

• rant

Just as a short reminder

If you’re constantly trying to improve your application processes by collecting feedback from applicants, but on the other hand do not provide any kind of useful feedback to the applicant, you’re far from finished.

D vs. Go vs. Python

• D,Go,Python

Leeeeet’s get reeeeeeaaaady tooooooo ruuuuuuumble!

I got interested in D after I had to write some code for a university class. I really liked its syntax and features and so I decided to pay a bit more attention to it. After finding out about D’s huge standard library and the DUB build system I got even more interested.

I began to re-implement some of my Python tools, which I needed for my university projects, in D. ! surprisingly easy and fun task! People often say they prefer Python because of its possibility to get things done fast, but after I ported some of my tools I realized that this is also possible using D!

Website Update

• website

It happened!

The days of my ugly static landing page have passed. I finally took the time to build a new one, and it turned into a fun project.

I started out from scratch and decided to tinker around with JavaScript, and since I really enjoy the efficiency of command lines, I came up with the idea to style my website as a terminal session. Take a look at it!

The actual website content like folders, links, files etc. is described as a file tree written in JSON and the user is able to move around in an absolute or relative manner.

Files are downloaded using wget, file contents are viewed using less, you can cd into directories or links, if you’re unfamiliar with a command, you can consult man and so on. There are several commands implemented and you can view the command palette via man shsh.

Pretty cool, eh?

Well… at least for someone who’s familiar with command lines. If you’re not, it might be a show stopper.

That’s why I created a second “default” page, which you can find here. It’s based on this beautiful template which I customized a little bit.

The code for my JS terminal is not yet on GitHub, but I’ll upload it in the near future.

So long

Simon

Patterns and Pipelines

• frameworks,ml,pr

tl;dr Here’s my pattern recognition pipeline code on github

Back in the days of my first semester (this sounds like it was 20 years ago…) at the FAU Erlangen I did a project for my computer vision lecture at the Pattern Recognition Lab. During my time at the lab I got to know many talented and nice people whom I learned a lot from, so I continued to work there and later on also did my master’s project with them. (And right now my master’s thesis :))

tiling-styles.org

• i3wm

I recently finished my last exam on my way to my master’s degree and wanted to spend some time off university related stuff.

While strolling through my G+ communities, I noticed that many users were posting screenshots of their DE / WM setup, especially in the Arch Linux, as well as the i3 users community. Seeing this, I came up with the idea for a webservice which allows users of tiling window managers (like i3wm) to upload and share their configurations, including links to wallpapers, GTK theme, config files etc.

It’s been a while since I did a project in Python and I’ve been keen on working with Flask microframework since I bought Miguel Grinbergs book on it some time ago.

I spent some days coding and trying different new things, and after I set up a server running Apache and a database my new project now is live at tiling-styles.org.

It’s written using Python3 and Flask with additional plugins, uses OAuth2 to log in using your Google account, SQLAlchemy as ORM and is backed by a MariaDB database. It already features a (not fully) REST compliant interface to query and download themes via web browser, and after the next milestone will also be queriable via command line.

And here’s the greatest part about it: After I published my project, other people really seemed to like it and came up with a great follow up idea. Some G+ users are trying to build a “theme switcher” for i3 based on my gallery! :)

I’m really stoked to see that my work inspired others to build some additional new stuff! Hope it’ll find large acceptance!

So long

Simon

P.S. Upload your configs! ;)

Goto is not always bad

• i3wm

Tiling window managers are said to be great to keep your desktop organized. But once you start using multiple monitors your amount of windows will slightly go out of hand.

At least that’s what happened to me lately…

One thing I found particularly annoying was the fact, that when setting up different workspaces on multiple monitors, i3 will switch focus between them when iterating over the workspace list.

That’s not what I wanted. I wanted to stay on my current monitor and switch immediatly to the window I was looking for.

So I began to search for a solution. And found one! :)

Passwords, please!

• D and Programming

A small project of mine requires the user to enter a password.

Since it’s not that cool to visibly enter any password, I was looking for a solution to hide the terminal output while entering the password.

A quick solution to this problem is shown below using a small snippet of D code.

OpenCV 3.0.0 on Arch Linux

• open-cv and computer-vision

OpenCV 3.0.0 has been released a few month back and ever since then I’ve been desperately waiting for it to make it into the official Arch Linux repositories.

Since package management takes some time this has not happened yet, so I decided to build it on my own and put it into the Arch User Repository (AUR).

If you are eager to try, it’s available here Link and also includes the additional contrib modules for nonfree parts.

My New Tablet Case And The Joy Of Bluetooth Connections

• General

Recently I bought a new case for my beloved Samsung Galaxy Note 8.0 tablet. The reason for this new case was its built in keyboard, something I got really used to for writing blog posts using MrHyde or checking stuff over SSH while on the go.

Show me the case!

Unfortunately I missed out reading the additional product information that it’s most likely not going to work on devices running Android 4.3 or higher, since 4.3 introduced a bug which broke communication with quite a lot of Bluetooth keyboards.

Meeeh, that’s not good. Especially since the case is of really good quality and I also like the keyboard very much.

So I started searching for possible solutions to my problem.

The first statement I read was that Google will release a fix which will get rid of this problem. Sounds cool in general, but since Samsung is quite lazy regarding updates for my Note 8.0 that’s not an option for me.

After a while I found an app called Bluetooth Keyboard Bug Fix, which promised to solve the issue. After installing the app I noticed it required root access, something I hadn’t aquired yet on my Note 8.0.

Conclusion: Root your device!

Everyone who’s already rooted an Android device once can surely tell you that there are tons of resources on how to do it. And the first thing I stumbled upon was a tool called framaroot, which was said to root my device in just the blink of an eye. Can’t tell you whether it’s true or not, the only thing framaroot did for me was telling me that the exploit didn’t work. Looks like framaroot doesn’t work anymore on Android 4.4.2.

The second option I found is a tool called CF-Auto-Root. Since it’s quite inefficient to write things twice I’ll just link you to the XDA thread which solved my problems: XDA

One thing you might still need are the Samsung USB drivers (Link) and a Windows machine (or virtual machine).

Long story short: Rooting the device and running the bug fix app solved the problem and got my new keyboard running! :)

So long

Simon

Code <-> Life

• General

Hi!

I just wanted to share an article with you I just read.

It’s an article about self-improvement by applying some standard techniques used in software development to your daily routine.

It’s an interesting read and also made me think a bit, since I noticed that, despite using all these things when writing code, I’m not really applying them to my everyday life.

Anyways, here’s the story:

Code • Life
We are already doing these things to our code, why not do them to ourselves?

Progress!

• General

Since the computer vision applications I’m writing are all running on the command line, I created a little tool for myself to visualize progress.

It’s just a really small tool which is dead simple to use, but it allows you to easily draw progressbars on the command line.

How to be creative?

• General

I did it again.

Set up a blog and wrote absolutely nothing important so far. Well done!

But here’s something I’ve been thinking about a lot these days, so if you’ve got a minute, you’re encouraged to continue reading!

##How to be creative?

Updated GPG key for university mail

• general

I just updated my GPG key for my university mail account.

You can find my new fingerprint on my landing page at simon-hofmann.org or, if you don’t want to go there, right here:

5AF8 41DA 62BF 1CAC D7DD 0118 A21B 28AA B3A4 D1D1

Please make sure to update your key database!

Updated server certificate

• general

I also just updated my server’s TLS certificate.

In case you are getting an error message because of a changed certificate, here’s the correct SHA256 fingerprint of my new certificate:

63:0C:AE:10:92:C5:1C:E0:83:DF:29:83:E1:31:33:45:42:F9:1E:1B:31:BD:B7:BD:19:59:F2:A2:CE:8C:97:1C

Hi there!

• General

Hello world!

I recently decided to set up a small blog on my server using git and Jekyll.

So here’s the result!

I’ll fairly regularly try to post stuff about my current (mostly software) projects or just random things here.

Since my exams for this semester are approaching quite fast, there’s nothing more to see here right now. But don’t hesitate to check back anytime soon!

So long