Tuesday, March 24, 2015

Text Editor for ChromeOS / Chromebook - No internet connection needed

If you a Chromebook user and you have a need to take notes locally (no internet connection needed) in a text editor or you want to be able to edit code when you lose internet connection, then here is a very simple Chrome app:





After a busy day at work using Microsoft .NET (C#), I go home and use my Chromebook for all the personal stuff. That includes some side HTML/Javascript/PHP/Python programming that I typically do in a cloud IDE. However, sometimes I need to take notes and do some code changes where internet connection is not stable. That's where this Text editor helps.

Here are some screenshots using different themes within the editor:











- almirsCorner.com -

#programming #programmer #code #coding #softwareengineering #softwaredevelopment #html #html5 #javascript #php #python #texteditor 




Monday, March 23, 2015

Simple tips for your Windows hosts file

Here are two simple tips for your Windows hosts file that you typically need to edit when you are doing some testing and you want to point your website to a specific server or a VIP.


(1)
Put the following line at the top of your  C:\Windows\System32\drivers\etc\hosts file:
#Do Not Replace

This will keep your file untouched in case your helpdesk team runs some machine updates and tries to update your host file and you end up losing all the information.


(2)
In your choice of editor, view the hosts file as a Python file. This will apply proper color scheme so that the active entries stand out with all other comments or commented out entries.



- almirsCorner.com -

#hosts #hostsfile #hostfile #tech #programming #programmer #code #coding #softwareengineering #softwaredevelopment 

Saturday, March 14, 2015

My Orange County - Some pictures in February and March 2015

Here are some pictures of Orange County that I took in February and March of this year.

Link to the full album: Orange County Feb, March 2015

Here is a preview with a few pictures:






- almirsCorner.com -

#OrangeCounty #SoCal #California #sunset #ocean 


Saturday, March 7, 2015

Heart Beat system in your applications - Why do you need this?

What is a Heart Beat system and why do you need it?

Heart Beat system track the health of some external/internal components/services that your application talks to.

If your application talks to some external service A and that service A happens to be down for X number of minutes/hours, then your application will be building up a backlog of connection because each connection now stay open longer because the timeout value is typically set to a value higher than an average response from this service. Over time your application could create a huge backlog to the point where the clients connecting to your application would experience slowness or failures. For a website with high traffic this could mean loss of thousands of dollars in minutes.

This is a where a Heart Beat system helps. Your Heart Beat system would track the health of this service A. Your application would check with the Heart Beat system if it's worth spending resources and even making a call to this service A. If the service A is down, your application with the help of Heart Beat system would not make unnecessary calls and consequently it would NOT build up a backlog of connections; that means there is not impact on your end customers which is what the business is all about.

There are two types of Heart Beat systems in my book:

  1. Heart Beat systems that works independently of your application and pings external/internal services that your application talks to. It periodically checks the health of these services and informs the application.
  2. Heart Beat systems that require your applications to feed it information/failures and then the Heart Beat system feeds back the decisions to your application when your application needs it. I like to compare this system to hybrid systems in hybrid cars which use the braking energy to feed the battery. It might be a perfect comparison but I like it :)

To demonstrate the concept of the 2nd type of Heart Beat system, I prepared a little web page with all the logic built into the Javascript of the page. The Javascript modules are separated into a module that emulates a client, a module that emulates a controller on web-server side, and a module that emulates an external service that your application on web server talks to. 

Here is the link to this demo:







- almirsCorner.com -

#software #softwareEngineering #programming #programmer #developer #code #coding #heartbeat #robustness #softwaredevelopment 

Friday, February 27, 2015

Solutions and Design Patterns - what comes first?

I have always been a believer of the following approach in software engineering field:

  1. Have a problem to solve or a requirement to implement
  2. Figure out a solution for it
  3. If your solution ends up being one of the known design patterns, all good. 
What you should NOT do after you get a problem to solve:
  • Do NOT go through a list of design patterns trying to find out which one could solve your problem.

The reason why I am saying this is because we are all guilty of this at some point in our careers whether we want to admit or not. What I am trying to say is that picking a design pattern first might just solve a part of your problem and it might even introduce unnecessary complexity. Please focus on finding the right solution.




- almirsCorner.com -

#architecture #coding #programming #softwaredevelopment #softwareengineering #ITsolutions

Thursday, February 26, 2015

Sunday, February 22, 2015

Emulate Database in HTML/Javascript - Here is the sample page/code

Here is the example. You can refresh the page and close the browser and it will still maintain the updates you make as it is using a collection of cookies to emulate database.

You can use this sample to build a full prototype site maintain the state of the customer and all the configuration. If you look at the javascript code in the below page, the key thing is the function that saves the encoded JSON string into multiple cookies by using a simple distribution in order not to run into individual cookie size limitation.

http://almirscorner.blogspot.com/p/emulate.html

NOTE: The dropdown selection does not properly work in IE because of one line of code. I know what to change, but I will not fix it yet. I figured this would be a good way to show a good interview question that you could ask in your company :)


Here is the full explanation of how it works:

http://almirscorner.blogspot.com/2015/02/emulate-database-in-client.html

- almirsCorner.com -

#html5 #javascript #coding #programming #code #programmer #softwaredevelopment #webdeveloper #database #almirsCorner

Wednesday, February 18, 2015

Emulate Database in Client HTML/Javascript code ??

Emulating database feel in the client HTML/Javascript code is a good option if you want to quickly prototype something while working with your product owners. You can build pages with forms and submit that data from page to page and emulate the concept of saving the data and that data can be used in other pages. This can be all handled within plain HTML files and Javascript code without server-side code.

To achieve this, the following needs to be done:

  • Set up Javascript objects and do some initial loading from some Javascript variables as strings of JSON. 
  • While you are loading these Javascript objects from default JSON string variables (using JSON.Parse method) that are set in the head of your page, you also need to save that information into cookies. The cookies would also need to be updated as you are adding/changing data on your prototype pages.
  • If the data exists in cookies, your page-load could be loading the information from the cookies and that's how you maintain the data and emulate the concept of database without having any server-side code.
Let me comment more on how you would save that information into cookies. The size of this data would cross the limits of cookie sizes. Every time you decide to save your Javascript object into cookies, you can do the following:
  • Using JSON.stringify method convert your Javascript object into a string
  • Then you need to encode this string variable using encodeURI function
  • Then you need to split your encoded string into smaller pieces and create cookies with a specific naming convention and sequence.
  • When you need to load this information from the cookies, you need to load all the cookies following the chosen naming convention and load them into your Javascript object. Don't forget to decode it before JSON.Parse function.
Here is the example. You can refresh the page and close the browser and it will still maintain the updates you made as it is using a collection of cookies to emulate database.

http://almirscorner.blogspot.com/p/emulate.html


- almirsCorner.com -

#html5 #javascript #coding #programming #code #programmer #softwaredevelopment #webdeveloper #database #almirsCorner 

Tuesday, February 17, 2015

Seat Covers - A nice refresh

I never considered getting seat covers for my cars until I found Wet Okole seat covers. Obviously if you paid money to get leather seats in your car, it does not make sense that you cover them with seat covers; if you are paying for that leather, you should enjoy it. If you are going cover your leather seats, I would like to thank you for saving them for me because I want to be the 2nd owner of your car :)

However, if you have cloth seats, getting Wet Okole seat covers is a good option to protect the seats and to also improve the interior look. Here is a picture of my 2007 Honda Pilot interior with Wet Okole seat covers. It is a perfect fit.





- almirsCorner.com -

#cars #carreviews #interior #seatcovers #seats 


Sunday, February 15, 2015

Coding a quick prototype or a quick tool - what to do?

If you want to put together a quick and lightweight prototype, Javascript and plain HTML are a good option because you only need a text editor and a browser. The end result is presentable. 

One example is a fuel consumption calculator that I quickly coded for myself. My Calculators


- almirsCorner.com - 

#programming #coding #programmer #coder #javascript #HTML5 

Thursday, January 22, 2015

OneNote 2013 - Task Management Tool - My System for task management

OneNote 2013 and OneNote in general is a very useful task management tool. It is really designed for note-taking and organizing your notes. When it comes to task management, its main purpose is not to organize your tasks unless you use it together with Outlook tasks, but I have developed a pretty good system that works well for me by utilizing some beautiful features of OneNote. I actually use GMail to manage my personal tasks, but when it comes to work, I needed something with more capabilities and I picked OneNote. 



How did I end up using OneNote?
Over last 9-10 years I have spent time trying to improve my organization skills and as a result of that, I searched for tools that can simplify my professional life. I liked the simplicity of Tasks application on early Blackberry phones and I was a big user of that app. I also went through the phase of maintaining my to-do list in text files and managing them via some useful editors such as Notepad++, Editpad, and CrimsonEditor. As my role and responsibilities changed and as the need for rich text format notes increased, I needed to find a tool that is Microsoft Word with better organizational features. That tool ended up being OneNote. I call OneNote IDE / Visual Studio for notes and tasks; if you are a tech person, you know what I am talking about.

What exactly do I use OneNote for?
- Taking notes in meeting
- As a knowledge base application (aka my Wiki)
- Reading emails and saving a useful piece of information/email into my Wiki in OneNote
- Keeping track of tasks that are current
- Keeping track of tasks that are in the backlog
- Organizing the tasks and all the details for my projects
- Sharing notes and to-do tasks with the team through a shared notebook in OneNote
- Team collaboration through a shared notebook in OneNote

Why OneNote?
It is a complete solution for note taking and organizing notes. If you use GTD (Getting Things Done) concepts, then you can use it for task management. However, if you expect to be reminded to do a specific task, you will either have to integrate OneNote with Outlook tasks or find some other product that had alerting system. Please watch my YouTube video below to see the system I am talking about.






- almirsCorner.com -

#OneNote #OneNote2013 #OneNote2010 #Outlook#Outlook2013 #tasks #taskmanagement #manager#organize #Microsoft #Office #Office365 #GTD  #GettingThingsDone  

Sunday, January 11, 2015

Automatics also get some credit. Right?

I recently wrote a post about traditional manual transmissions in our cars and how there is something special about them. Traditional Manual Transmissions - Why? What's so special about it? 

I need to slightly re-evaluate. 

Having driven cars with regular automatics, shiftable automatics, double-clutch automated manuals and traditional manuals, I want to say that automatics in general deserve more credit than they do. Automatic transmissions changed the car industry when they were introduced. At first the automatic transmissions were not efficient from both economy and performance points of view. However, manufacturers have invested a lot of engineering time into this technology and we are at the point now where a car with an automatic transmission can achieve better gas mileage than the same car with the traditional manual transmission.

When it comes to performance numbers, we also reached the limit which allows a regular driver driving an automatic out-race a regular driver driving a traditional manual. The automatic transmissions also give you consistency.

On the other hand, the subject of being engaged as a driver with an automatic vs. manual is a very hot subject. It is a constant discussion/debate among car enthusiasts. I think this subject is not up for a debate. It is a personal preference from driver to driver and from car enthusiast to car enthusiast. 

For those who still prefer a manual transmission (including myself at this time), we still have to admit that automatic transmissions (also automated manuals) on sporty and sports cars are very engaging. I mostly owned cars with manual transmission and my previous car was a Mini Cooper with a shiftable automatic. I really enjoyed this Mini Cooper. I drove this car pretty much 99.9% in the tiptronic mode. Mini really tuned this transmission. In the sport mode, this transmission had very fast upshifts and downshifts. It was really fun taking it on canyon roads doing those upshifts and downshifts. The only modification that I had on this car was a custom Magnaflow cat-back exhaust. This tiptronic transmission paired up with a nice exhaust tone gave me satisfaction for 3 years. Then I started missing traditional manual transmissions. I sold my Mini Cooper and bought a Honda Fit with a traditional manual transmission. I had to first go through the honeymoon phase driving this Honda Fit and then I had to objectively analyze the situation and my conclusion was that "Automatics should get the credit that they deserve and that it is not all about manuals". 

Mini Coopers have regular automatics that allow you to shift gears. 997 models of Porsche 911 also have regular automatics and they are very tuned. I drove my friend's Porsche 997 automatic with manual shifting capabilities and this is very fun. When you start getting into the category of automated manuals (aka double-clutch transmissions), then automatics deserve even more credit. I drove my friend's VW GTI with DSG transmission. This thing is very enjoyable. The shifts are especially engaging when paired with a nice exhaust tone. I don't want to even think about PDK transmissions on the new Porsches; they would make me switch back to automatics :)

So the question "which one is better" in itself is a wrong question. It all depends what car it is paired with and what your preference is. Whichever one you pick, make sure that your car does not sit in your garage. Get out there and drive it. Enjoy it.





- almirsCorner.com -

#cars #PDK #DSG #transmission #clutch #doubleClutch #tiptronic #automatic #manual #shiftknob #gears #gearshifter #5speed #6speed #7speed #8speed #CVT 






Saturday, January 10, 2015

Creativity vs. Organization?

I have noticed that I am more creative in my software engineering field when I am less organized or when I tune down on my organization. This allows my mind to function differently. However, when I finish going through a creative period, I still have to catch up on the organization part because that's what the tech lead position requires from us in general.

Over the years I built a system for myself to do my general task management and the task management during large projects. The main goal was to make this system as mechanical as possible to that my mind is not busy organizing things; it should be busy dealing with the engineering problems and solutions. So when my organization system is truly mechanical, this also allows my creativity to kick in and it's a great feeling when you reach that level.

Do you feel the same way about this? I should research if there is any scientific study about the relation between creativity and being organized.


- almirsCorner.com -

#tech #technology #programming #code #coding #programmer #softwareEngineering #softwareDevelopment #creative #creativity #organization #organized #taskmanagement 

Thursday, January 8, 2015

Smart TVs - Do we need the smartness?

Smart TVs ??

Smart TVs maybe getting smarter and the user interface is getting better. However, for us tech nerds is this even a factor in TV purchase decisions?

Most of us tech nerds would get Roku, AppleTV, Chromecast, and Amazon Fire TV after purchasing that TV. The only thing we care about is the resolution, and the ports that the TV has.

Right :) 

- almirsCorner.com - 

#tech #technology #TV #resolution #HD #4Kdisplay #Roku#AppleTV #chromecast #AmazonFire 

Purchase or Develop ?

To purchase a tool/solution or to develop it yourself? 

That is the common question in companies that have the luxury and cash to purchase expensive packages. There are pros and cons on both sides. 

If you decide to purchase a solution, you have to do all the calculation to make sure it is worth the investment over paying your developers to implement something custom for your company. 

It all depends on what part of a solution you are purchasing instead of developing yourself. If you marry your business too much with external tools/solutions, then you have to follow to some degree their train schedule. What degree is the limit?

On the other hand you may develop it yourself. However, do you have the expertise in house. Even if you do have expertise, do you want your developers working on this instead of implementing requirements from product managers.

These are not easy decisions. 

Trends change quickly in IT industry and the main question you have to ask yourself is: Is the tool/solution that I am about to purchase a part of just this current short-term trend or is it here to stay?


- almirsCorner.com - 


#tech #technology #programming #programmer#softwareengineering #softwaredevelopment#SoftwareArchitecture #software #ITsolutions #code #coding