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.
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.
I used Nodemailer and Mailgun to send emails. I first tried Gmail but it blocked messages to other emails, so I switched to Mailgun.
Thursday, May 31, 2018
How to follow up
When you assign a task to someone else or wait for their input, ask them when they think they will finish. If they say "I don't know", ask them when they will be able to estimate. Note that date in your personal notification system (e.g. Google Calendar). When the day comes, send them an email about the status of work and a new finish date estimate. If they don't answer your email within a day, call them or have a face-to-face meeting. Repeat, don't let them off the hook (!) Otherwise, many tasks are forgotten and drag on for months. I have personally experienced tasks where the initial estimate had been three weeks and were actually finished in three years, I kid you not!
How to get novice engineers up to speed without wasting time
Fresh engineers are usually not of much use in design work. If you involve them too early, they will mess things up, ask too many questions and waste everyone's time. The best strategy is to assign them improvement of documentation and testing of an existing system. Since they don't know much, any difficulty they have is an opportunity to improve documentation and procedures. That way they can acclimate to the work environment and be useful from day one.
Another important point is to get frequent feedback (e.g. with daily Scrum meetings) because they will retain only 50% of what they have been told and veer off course pretty quickly if not course corrected. Ask them to log in daily comments to the issue assigned to them in the issue tracking system (e.g. Jira).
Another important point is to get frequent feedback (e.g. with daily Scrum meetings) because they will retain only 50% of what they have been told and veer off course pretty quickly if not course corrected. Ask them to log in daily comments to the issue assigned to them in the issue tracking system (e.g. Jira).
Wednesday, May 30, 2018
Smallest negative double in Java
In Java Double.MIN_VALUE is the smallest positive double value. This different for Integer and Long classes: Integer.MIN_VALUE and Long.MIN_VALUE are the smallest negative values. If you want to use the smallest negative double value, you have to use -1*Double.MAX_VALUE.
Subscribe to:
Posts (Atom)
