Testing / UI week

For the past week , I have been creating integration tests on my task (create short code with sequence generators) . I also did some fixes on the UI and set textboxes to “ReadOnly” during view mode .

Also , excited to be part of the launching of Tong Hin’s App to be used in the real world soon . The more that I’ve worked with my supervisor , I found out that code is easy to write , but it’s challenging to write good code . Reminds me that if I want to improve as a programmer I need to go back to basics and develop good habits . Therefore , always remember to :-

  1. KISS (Keep it simple, stupid) , never write code that is too “clever” . Use meaningful variable names so that it’s easy to read and know exactly what is going on .
  2. Clean / Refactor code at all cost , making it more efficient and keep the result same at the end .
  3. Document your code , write comments on functions , variables , entity relationships etc to make it easier to understand when revisiting your code after months .

Will progress slowly by doing these mini steps . So that’s it , see you next week !

Row Version Update Upon Saving & The Importance of Clean Code

As my supervisor plan to print details in the system, I am required to and in new attribute in my current context. This attribute would actually be printed and customizable according to liking.

Next, rowVersion of current context won’t update whenever the changes is made in sub attribute. Therefore, I am required to add attribute “ModifiedDateTime” with attribute type of datetime. This attribute is used upon save button been clicked. Whenever a new/existing set of data is updated, ModifiedDateTime would update the latest date and time to the database, thus update the rowVersion.

Alongside of these implementation, I by accident altered my code. Which the alteration cause failure of updating ReadyToPick in my context. Thankfully I did commit my code frequently, hence, I am able to track my changes and revert it to working implementation.

I read through a few pages of Clean Code by Robert C. Martin. I found one interesting topic that more or less related to me which is about Bad Code. Many implemented application/system went down due to bad code. Bugs appears all over the system, crashed the system or even load time kept on increases as the system is not repaired. Major factor is mainly due to Rush, thus making big mess in code. As these mess builds, it may drag the productivity of one team. Eventually, it may cause the need of having more staff to help increase the productivity to its original phase. Which also may result more and more mess towards the project, as everyone trying to increase their productivity under pressured environment.

As the conclusion, I shall make sure my code is clean and easy to understand by others. It will bring benefit towards future me or other team member that is working on the same project. Therefore, Repairing, maintaining or adding implementation can be a lot more efficient.