Search This Blog

13 December 2016

Keeping it localized

    We thought of implementing a small web app in Go for localization of resources and translations. There are such apps available:

    But then we thought it is not that important tool. The job can be accomplished in a shared spreadsheet. Like our example of issue tracking:

    The same can be done when we want to localize our resources or translate a text in multiple languages. One spreadsheet per language and we are done. No need for special tools, when everyone already is familiar and used to using the tool, in this case a spreadsheet editing program.

06 December 2016

Automation, Not ?

    We all know that automation is good. No one likes boring repetitive task that can be passed to a machine to execute. But if we specifically and regularly are forced to change our code just to accommodate automation, well then "you are doing it wrong". Yes there are decisions that we need to make so that automation is possible, but it is possible through clean, well structured and maintainable code. That is it. (here is an article with the same opinion and some more things: http://ithare.com/testing-my-personal-take-on-testing-including-unit-testing-and-atddbdd/).
Automation should bend backwards, sideways and any other way to fit our workflow, not the other way around. Otherwise we are in the case of those memes, which mock "doing automation the manual way".

13 November 2016

Postman

    We were reminded to mention a great tool - Postman, because of this “New from Postman” issue:


    I don’t remember since when I started receiving these Postman newsletters, but they are great, Postman is great. And I am sure we would all be very surprised that there are a lot of people developing services or applications that consume services, that don’t use such tools. It may not be Postman, there are other solutions, but please do use something.

10 November 2016

Someone said let's self sign it

So I wanted to check my voting location for the Presidential elections in Bulgaria and I came across this on the GRAO website:https://www.grao.bg/elections 



Then in one of their pages they explain that the site is not secure and that the user has to install their root certificate in order to secure their connection to the website.




So they are using a self signed certificate and they are telling us it is OK.
Not cool guys. Don’t invent security. Just get a proper certificate !

01 November 2016

Store locations

Some time ago I came across an interesting puzzle:

http://www.questers.com/news/quest-wars-win-pass-jprime-2016

In short we have some customers home addresses/locations and we need to place our store where there is the biggest concentration of people.

Here is our solution as an Android application, which uses k-means clustering algorithm. This way the engineers and marketers sent on distant planets can map the location of the population and calculate where is the most convenient location for stores, star ports and other facilities to provide the best customer service :)

Link to the repository at GitHub:
https://github.com/ektodorov/EwokStore

 Initial screen



 We add the population (coordinates are from 0-100), and input the area that the store is going to cover  (size is from 0-100)





 We see the store coverage area (the lighter colored rectangle) and the biggest cluster of population (the darker colored rectangle).

05 September 2016

Java reference notes

    The other day I saw the notes of a Junior Java web developer and it looked like a textbook. Well may be not like textbook, but at least a good quick reference guide. So I asked to photocopy them and here they are for everyone that may need it:

31 August 2016

Java WeakReference counterpart

We have all heard of different reference types - weak, strong, soft. We think that the WeakReference class is very useful. But we noticed the lack of StrongReference class and we think it can be useful as well. So here is our implementation of StrongReference:


1:  public class StrongReference<T> {  
2:    
3:      private T mType;  
4:        
5:      public StrongReference()  
6:      {  
7:          super();  
8:      }  
9:        
10:      public StrongReference(T aType)  
11:      {  
12:          super();  
13:          mType = aType;  
14:      }  
15:        
16:      public synchronized T get() {return mType;}  
17:      public synchronized void set(T aType) {mType = aType;}  
18:  }  

We are using synchronzed on the get and set methods, because we use the StrongReference concurently, and this was the use case we had in mind when creating it in the first place. But if your use case is different you can remove them.