This year has started slowly and weekly notes has frozen to monthly notes. This time they tell us i.a. how to put Spring Boot in Docker, useful features of Java EE 7, ponder what all there’s to do to launch your mobile app, read tips how to get better with Node.js and how smaller is better. And finally we have Yoga routine to keep our body in shape.
New year’s Spring Boot tricks in a container
Read how you can combine Spring Boot’s hot restarting and running application in a Docker container. Of course you could just run Spring Boot from the IDE and expose the MongoDB container port for the application.
Nashorn: Run JavaScript on the JVM
Nashorn is a high-performance JavaScript runtime written in Java for the JVM. It allows developers to embed JavaScript code inside their Java applications and even use Java classes and methods from their JavaScript code. But why would you want to do that?
Creating perfect App Store Screenshots of your iOS App
More about app screenshots. This time doing it “the right way” for all device types and languages. Isn’t easy this time either but it’s automated. You just need to use snapshot, frameit and to use UI Tests.
Why you shouldn’t bother creating a mobile app
Post-mortem of Birdly, a receipt management app in the business to business market. Gives insight and lessons to learn about the App Store. Even though the app had good use case the users didn’t really need it. (from Indie iOS Focus Weekly 48)
Tools
Find & fix known vulnerabilities in Node.js dependencies
Snyk looks to be quite crafty tool to find & fix known vulnerabilities in Node.js dependencies. Integrate Snyk into your CI and monitoring your applications for newly disclosed vulnerabilities.
TL;DR; Simplified man pages
Simplified man pages for when you just need to get shit done. Finally! You can use different clients for it and install if from e.g. npm install -g tldr.
The Website Obesity Crisis
Keynote from Web Directions 2015: The Website Obesity Crisis. Beautiful websites come in all sizes and page weights but mostly-text sites are growing bigger with every passing year when there’s no reason for that. There’s also video.
How to Become a Better Node.js Developer in 2016
Tips and best practices not just for development but how to operate Node.js infrastructures, how you should do your day-to-day development and other useful pieces of advice. (from Twitter)
TL;DR; Use ES2015, follow callback conventions and async patterns, take care with error handling, use JavaScript standard style, follow the Twelve-Factor application rules, monitor your applications, use build system, update dependencies weekly and keep up.
Something different
15-minute yoga routine to enhance balance and agility
See how yoga can help you to enhance your balance and agility, including a 15-minute video that demonstrates these principles. This is targeted more for mountainbike riders than developers but better agility and balance doesn’t hurt anyone :)
I’ve been using IRC for some time and although Irssi has served me well, it’s time to try something different. WeeChat is a modular chat client with support for IRC and the interesting part is that it’s possible to use other interfaces like glowing-bear web frontend. WeeChat is similar to Irssi so switching over shouldn’t be an issue. But to get the configuration right and what you had on Irssi needs some effort. Here are my notes about starting with WeeChat and how I like my chat client to look.
Compiling Weechat on CentOS 6
I have my shell on CentOS and although you can find WeeChat from the repositories, it’s quite old (0.4.3 when 1.4. is the newest). So you might want to compile WeeChat by yourself. Compiling WeeChat is explained on the User Guide. You need to install some libraries before you can try using make.
After you’ve installed the needed packages download WeeChat sources and extract the weechat-1.4.tar.gz package to directory you want.
Go to the directory you extracted WeeChat and run the following commands:
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/directory
$ make
$ make install
$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/directory
$ make
$ make install
Configuring WeeChat
Quick Start guide helps you to get started so I don’t duplicate that here. If you’re familiar with Irssi you should feel more or less at home. As I didn’t use much scripts in Irssi the most difficult part for me was to create as good theme as I had with Irssi. Otherwise the switch went better than expected.
Start WeeChat with weechat so we can start configuration.
When I started with WeeChat of course I googled how others had configured it and thus my configuration is based on this and some other snippets.
buffer_autoclose.py: Automatically close inactive private message buffers.
iset.pl: Interactive Set for configuration options
colorize_nicks.py: Use the weechat nick colors in the chat area and command line.
urlbuf.py: Common buffer for received URLs.
irssi_awaylog.py: Log highlights/private messages when you are away.
screen_away.py: Set away status when detaching and attaching from screen or tmux.
To see and set the options for the plugins you can use /set with wildcard “*”
/set *urlbuf*
/set *away*
/set *urlbuf*
/set *away*
You can install scripts also by typing “script search iset” and a selection of available plugins will appear. To leave it type “q” then press enter, if you want to install the script type “i” then press enter.
Adjust layout and colors
Make the title bar and the status bar using dark colors.
Some visual bits to make Weechat a bit nicer. Like replace the nickname for a message with a little arrow if the previous message in your buffer was from the same user.
By default, WeeChat displays time and prefix for each line and optional bars around chat area which makes clicking long URLs impossible.
To make easier URL click, you have to options as explained in FAQ:
1. Enable option “eat_newline_glitch”, so that new line char is not added at the end of each line displayed (it will not break URL selection):
/set weechat.look.eat_newline_glitch on
/set weechat.look.eat_newline_glitch on
2. Move nicklist to top and remove alignment on nick:
/set weechat.bar.nicklist.position top
/set weechat.look.prefix_align none
/set weechat.look.align_end_of_lines time
/set weechat.bar.nicklist.position top
/set weechat.look.prefix_align none
/set weechat.look.align_end_of_lines time
I found the first option to be better as it lets you to have the prefix after nick and before text. It’s not as good as Irssi has it but it works. I hope they’ll merge this pull request which should make it better.
You can also use the bare display (default key: Alt+l).
Other notes
Joining channels with channel names on different character set, like ISO8859-1 and umlauts. You need to input the octal code for the letter, for example latin small letter a and o with diaeresis:
The default key is Ctrl+r (command is: /input search_text_here). And jump to highlights: Alt+p / Alt+n.
Log all messages on IRC buffers but not join/part/quit messages:
All IRC buffers: /set logger.level.irc 3
Server and its channels: /set logger.level.irc.freenode 3
Specific channel: /set logger.level.irc.freenode.#weechat 3
Configuration with iset
Now you should have basic setup quite right and to continue configurations it’s nice to use iset plugin. Just type /iset to enter the iset screen. You will now see a list of all the parameters which can be modified. If you type something in the input bar, it will look for the pattern in the list of variables. If you want to search through the values, put an = before the pattern.
To change the value, press Alt + Enter then enter the new value (it is possible to navigate through values depending on variable type by pressing the Tab key).
Summary
After short use WeeChat works as well as Irssi and vice versa. It will be seen if I stuck with it or get back to Irssi. I’m not quite satisfied with the configuration but it works well enough.