Friday, June 29, 2018

JTable background paint problem

I have a Java JTable with JFormattedTextField in it. I want to set the background color of text field to red when the value in it is not valid. Naturally, I added a focus listener to the text field and set the background color in focus lost event. During tests, I noticed that the background changes when I click on another text field in table but does not change when I press the tab key. The solution is to call JTable.repaint() after setting the background. I think the reason it works when I click on another text field is that during that click, JTable.repaint() is automatically called. Another adventure/nightmare in Java UI...

Wednesday, June 27, 2018

Social Media Diet

As someone whose job requires strategy development, team management, design and software development, concentration is my main asset. When left unchecked, social media consumes a lot of concentration. My social media habits are as follows:
  • I do not watch TV. I rarely watch any movies since I have already watched the best ones.
  • My main sources of information are my YouTube subscriptions. I spend at least 1 hour a day watching videos of those channels. They are related to technology, lifestyle and business, with the occasional cat video sprinkled in between.
  • I listen to podcasts or ebooks while commuting.
  • All notifications on my mobile are turned off.
  • On my mobile, do not disturb is automatically turned on after 22:00.
  • Most Whatsapp groups are in silent mode.
  • I don't have Facebook, Instagram, Twitter on my mobile.
  • I have Facebook on my laptop. Most of my contacts on Facebook are in unfollow mode. This cleans up my Facebook page and let's me spend less than 5 minutes a day on Facebook. I use Facebook mainly as a photo album of friends, not as a source of information.
  • I don't look at my mobile while eating or in WC.
These habits free up a lot of time compared to the majority of people who seem to be addicted to their mobile. I spend that time on deep thought which provides me with lots of ideas that I note in Gmail, Calendar or Drive.

Tuesday, June 26, 2018

Effective Jira

I am using Jira to record and track issues. After I have recorded an issue, my daily workflow is as follows: In the morning, I enter a comment about what I plan to do that day regrading theissue and how I plan to do it, including any questions I have. During the day, I update the comment with what I did and how I answered my own questions, or sometimes, how I got stuck and had to change course. In a way, I do micro-planning, micro-design and micro-implementation, all in a diary style.

The next time I work on the issue, I repeat the same workflow. This allows me to clarify the problem and help me quickly get up to speed when there is a long delay (e.g. 1 week) before I can touch the issue again. It also helps me prepare for our daily Scrum meetings. If it is a long running issue, I can quickly see what I did along the way and be able to easily explain why it took so long, especially if it is an issue that needs input from other people and those inputs were delayed.

Sunday, June 17, 2018

New web application

I developed a new web application and deployed it on my VPS. It has a HTML + Javascript frontend and a Nodejs backend. The app daily checks if a certain Turkish law (4734 Kamu İhale Kanunu) has been changed and informs the people on the email list.

I used Nodemailer and Mailgun to send emails. I first tried Gmail but it blocked messages to other emails, so I switched to Mailgun.