My iPhone4 got the "people can't hear me" problem. I've exhausted all the possible trick to solve it that does not require opening up the hardware. There is little-used s3-mini laying around so I decided to try to migrate to it and see what happen.
I expected some limitations when moving to Android from iOS since I have been accumulating many apps and it has quite integrated to my daily workflow. However, after sometime, I can say that the migration is quite seamless. Most of my usage can be transferred to Android plus some more Android-specific goodies (I think widget is cool). More about this below.
The Apps
At this point, almost all the well-known apps have both iOS and Android version. So, for apps like Evernote, Springpad, Pocket, Feedly etc. I don't have any problem at all. There is slight differences here and there but for my personal usage there is nothing significant that I find missing.
For less well-known apps I usually can find the comparable counterpart. I have to say though, the apps on iOS feels more "elegant" somehow. However, if you care mostly for the function, it's quite negligible since Android now has large number of well-written apps.
Surprising Finding on Navigation Apps Department
I have Garmin Indonesia on my iPhone and it is sad to see that there is none of it on Google Play Store. I have searched for the alternatives on several occasion with no luck until I stumble upon Polnav EasyDriving app. It's quite "hidden" from my previous search, probably because it's google playstore page uses non-latin characters mostly.
Surprisingly, it works really well. I used Indonesian map from navigasi.net (which is a really great crowdsourced map, BTW) and it is loaded very nicely. The navigation screen is clear, fluidly updated and give me several notification when getting close to turn to make sure I don't get past it. Really cool!. And what is even more surprising is that is free which is quite unusual for offline gps navigation app nowadays.
The search for address is really good but somehow there is no POI-based search that I can find. This is quite unfortunate and hopefully it will be there on future versions. Aside from that, I have no complain for it.
What is Missing
One thing that I miss quite a lot is a good freeplane-compatible mindmapping app. There is iThoughts in iOS but none that comparable to it on Android. Fortunately, I have been "flattening" my data recently and many has been migrated as Evernote or Springpad data. Some of it are still on freeplane format though and for those I still have iThougts on iPad. So it's not really a critical issue actually but it will be nice if I can still accessing my mindmaps on the smartphone too.
My iPhone4 is not going to retire soon though, I still have it laying around and use the apps on it occasionally. It basically now function more as and iPod than an iPhone. For example, I still use Garmin on it although I already have Polnav on Android as mentioned above. It is still useful to use GPS on separate device on some circumstances.
So far I quite enjoy the migration and I can't say it's better or worse. It just different, I guess.
Thursday, February 20, 2014
Migrating to Android from iPhone
Diposting oleh
Hafiz
di
Thursday, February 20, 2014
0
komentar
Tuesday, February 04, 2014
Import Existing Repository to Bitbucket using TortoiseGit
When you want to import an existing local Git repository to bitbucket you can follow this official guide. However, one of the section involving steps with git command line as below :
I am used to using TortoiseGit on Windows and rely on it for all my Git command needs. So, I find it unpleasant to go to the shell to just do all the above. It feels like a leaky abstraction happening. I am sure there is more convenient way to do it using TortoiseGit instead. So, below are the above steps done using TortoiseGit :
- Right click on the folder->TortoiseGit -> Settings
- Git->Remote and enter remote origin value as pictured below

- Right click on the folder->TortoiseGit ->Push
Diposting oleh
Hafiz
di
Tuesday, February 04, 2014
0
komentar
Label: git
Monday, November 25, 2013
Use Fiddler to help with development with Web API
Developing application that connect to Web API can be quite a pain if we are not equipped with the right tools. Network issues, response format, request parameters, could add more to an already existing complexities. On the early days, I usually use Firebug for most of the task to debug Web API. Lately, however, I rely more on Fiddler. It does all that Firebug do for me plus much more. Compare to Firebug, Fiddler the debugging feels much more active since we can modify and manipulate a lot of things to test different cases on Fiddler itself without having to write test code or scripts. It sits between the application and Web API so we can build scenario to test each side.
Here are some of its use :
- Tracing request and JSON response. This is probably the most important ones. Tracing response on the code or by debugging in IDE can drain a lot of development time quickly. By monitoring it outside the application in realtime help us to focus more on the next step i.e: fixing code, add feature
- Emulate scenarios. The request / response can be emulated in Fiddler which enable us to see how the server or client response on certain request / response format and content without having to write the code first and do expensive IDE-based debugging
- Offline response. There are times when we want to rapidly and quickly test client behavior on certain response. Having to actually request to server could make the work take long since each request involve the whole request / response sequence. Fiddler could tap certain request format and give cached/predefined result instead. This will speedup the work since there is no actual network request happening. It could also help when we have issues with network availability when developing
Diposting oleh
Hafiz
di
Monday, November 25, 2013
0
komentar
Label: application, coding
Wednesday, October 30, 2013
XtraGrid : Use more specialized event for better code in handlers
DevExpress's XtraGrid is quite a complex beast. It's a library with tons of features and it can be overwhelming to use it optimally at first. So you might get your job done with certain way but overtime you find something new that you didn't notice at first that actually a better way than how you did previously.
That is the case when I just notice that XtraGrid has RowCellClick event that fires on specific cell click. I have been using Click event previously. Click event work just fine, however within it I need to have numbers of code to filter out cases that is not relevant to what I am trying to achieve. On the other hand, RowCellClick already comes with RowCellClickEventArgs with all the relevant info has been nicely parsed for use. The code get much cleaner when I adapt the code from handling Click event to RowCellClick.
So, the lesson is to use the most specific event that fit your case instead of the more general one. It can be a good guideline for using other parts of DevExpress library too. DevExpress components do a lot of inheritance from .Net components and with it inherit lots of pre-defined functions too. So, it has to do some specialization to extend the functions. Hence, it has some functions that is quite similar but slightly specialized.
Diposting oleh
Hafiz
di
Wednesday, October 30, 2013
0
komentar
Label: coding
Springpad + Evernote, Revisited
I wrote about using Springpad and Evernote sometime ago. My use of them since has evolved following the progress of those two services/apps. For example, Springpad note support was quite basic at that time but now it has become quite consistent and enjoyable to use. So, some of my setup has follow suit.
I now use mainly Springpad while Evernote is more for exceptional things like on the cases below :
- Need things offline
- Long writing
- More "sticky" stuff like resources for projects
- Scans and documents
- Manage and track media : movies, series, books, games, etc. It is really useful on this
- Checklists : Springpad checklist support is quite advanced and it's what I have been looking for sometime
- Project research and resource collection : Springpad has various type of content, not just notes, that makes collecting resources for projects really
- Random notes, items and collections : for collecting interesting item from either online or offline that has not yet fit anywhere yet. I can search or organizing it easily later on
Diposting oleh
Hafiz
di
Wednesday, October 30, 2013
0
komentar
Label: system
Friday, October 11, 2013
Visual Studio Deployment Project : Make Single Executable Installer using WinRAR
I wrote a while back of making a single executable installer for Visual Deployment Project (which output two file : setup.exe and setup.msi). It was done using IExpress that comes with Windows installation itself. However, it feels quite outdated now. Even the page that I refer to in that post is no longer works :). It require some scripting and the use of IExpress is not exactly intuitive nor friendly.
So, comes more straightforward solution using WinRar. I stumbled upon this post on stackoverflow. It basically intend to do the same thing using self-extracthing-archive feature in WinRar. It works much better and more maintainable. It does not require external scripting and you can add logo, title, description for the bootstrapper. I find the resulting installer looks cleaner to run with helpful info/logo.
You can checkout the post above for some description and screenshot (hopefully stackoverflow link is more long-lasting). In summary, the steps are :
- create New Archive
- set to SFX mode
- go to advanced tab
- click SFX options button
- customize things to your needs
Diposting oleh
Hafiz
di
Friday, October 11, 2013
0
komentar
Label: deployment, visual studio
Tuesday, October 08, 2013
Note from "The Lean Startup"
I have recently finished reading "The Lean Startup" by Eric Ries. It takes an experimental (as in scientific method of testing hypothesis) approach to make the work more efficient (does not waste valuable time/cost) and efficient (working on the right thing). It emphasize on the importance of rapid learning and adjustment based on that learning. In this aspect, it seems to use the same foundation of Agile Software Development i.e: make small iterations and adjust/improve process/prediction after each iterations.
Below is summary of the process on Lean Startup:
- Make leap of faith. Make your hypothesis that you think is true, just make your best guest what will be useful and interesting to user so they will use it. Assume for now that it is true.
- Develop Minimum Viable Product. Work on smallest possible set of feature that will have significant effect first. The smallness is important for having rapid feedback for learning
- Validated Learning. Review the reesult of the above using actual/verifiable data
- Pivots. Decide based on the learning above what is the best course to take next. This could be improving things, discarding things or drop it and do something else entirely
Diposting oleh
Hafiz
di
Tuesday, October 08, 2013
0
komentar
Label: book
Friday, October 04, 2013
Accurate and Consistent Naming, the simplest yet has the most beneficial discipline in programming
I think if you have to name one discipline that is the most simple but give the most return in term of maintainability, it's probably proper naming. You can do any fancy pattern or coding practice but if you are lazy in maintaining consistent naming of variables, functions, classes, your code will soon rot and unmaintanable. Ironically, it probably the simplest practice to do, especially with powerful capabilities in todays IDE and text editor in doing search/replace and rename-refactoring.
When you don't consistently naming everything properly in your code, you'll obscure your code intention thus making the maintenance hard even for yourself, let alone others. I prefer to write code that I can forget, meaning the code that when I visit it again in the future, it will take the least effort for me to remember what it is that I intent to express with it. Ideally, looking at the naming, structure and perhaps some external notes and diagram should be enough for us get an understanding into the code again.
There is now a lot of guideline how to do consistent and proper in naming in codes. There might also some variation of guidelines between languages, framework, platform. Whatever standard you use, any naming guideline/standard is better than none, I guess. Do yourself, and others, a favor and properly and consistently naming things on the code.
Diposting oleh
Hafiz
di
Friday, October 04, 2013
0
komentar
Label: coding
Thursday, October 03, 2013
xUnit : Low Cost/Commitment Unit Testing
I have been having love/hate relationship with Unit Testing so far. I understand the need and rationale behind it and often times I even enjoy doing it and makes programming more fun. However, when the tests has hit certain large numbers and you accumulated significant cases where it just hard, if not impossible, to test (despite decoupling the code heavily and usage of patterns in high-dose), unit tests becomes a chore and annoying burden to maintain. You start to question yourself it's worth the trouble and should you just going forward without TDD.
I find the test framework that I use is a significant factor whether I keep unit-test the code. Having found xUnit sometime ago, I can now say again unit testing is functional, useful and fun again. Unit tests is support/driving activity of the main activity (coding), so the simplest possible support code/framework is the way to go. xUnit has minimal "accessories" which make writing test code quick and straightforward. So far, it fits my need of unit test framework. For example, it get rid of Setup and Teardown and use very minimal set of attributes.
One important thing, psychologically for me, of having simple unit test framework is it makes my attachment to my unit tests relatively low. This means I can throw away, rewrite, change my unit test anytime and anyway I want with very minimal guilt. I can throw away large number of any unit tests that no longer serve any purpose and start over with the tests progressively. I can do architectural level changes with more freedom without unit test maintenance becoming too much of a burden. My focus now back to the main logic of program with unit test to support it.
Of course, at some level, unit test framework can be very personal choice like choices of your favorite text editors or OS. Personally, I like xUnit for my (.Net) testing framework. If you have been throwing unit testing from your development arsenal lately, you might want to try xUnit and see if it can interest you to get back to unit testing your code again.
Diposting oleh
Hafiz
di
Thursday, October 03, 2013
0
komentar
Wednesday, October 02, 2013
Free solution for .Net Profiler : Slimtune
When it comes to profiling and performance tuning of application for .Net application, the proprietary solution can be quite expensive. However, I stumble upon SlimTune recently. It's a free .Net profiler and I find it quite sufficient for common profiling needs.
If you just interested to see your application performance hotspot, it already does that quite well. It's not fancy, sure, and the GUI need getting used to initially, but it does it's job fine. I can spot and tune the performance issue quickly with it.
Diposting oleh
Hafiz
di
Wednesday, October 02, 2013
0
komentar
Label: application
Thursday, September 26, 2013
No Duplication for a Good Code and Good Life
More things in life does not always leads to a good quality life. If the things is duplicated, its function is already done by something else, it's existence is a clutter and use up unnecessary energy. The duplication is bad in code too, it is a nightmare to maintain the same logic that scattered on several places. One changes on one place need to be repeated on the other ones that use similar logic, otherwise you'll break the code.
Having enough things is not just about living a minimalistic lifestyle, it also a way to stay sane, to not use things unnecessarily. If we can simplify things internally, we can achieve more complex meaningful things with much ease.
Diposting oleh
Hafiz
di
Thursday, September 26, 2013
0
komentar
Label: coding, miscellaneous
Wednesday, September 25, 2013
Bootstrap : Programmer's Friendly Web Front-end Framework
I had task recently to port some web content into a mobile App. I translated some web-navigation navigation into native mobile one. For example, some section listing is translated into TableView in iOS. However, for the content pages itself I need to basically put the HTML content into an offline-bundled resources within the App.
Below is some problem with the task :
- The Desktop version link to various online Javascript and CSS resources
- The layout is for desktop and need to be made more mobile-friendly
The content of bootstrap pretty much suffice for the current typical need for multi-device HTML rendering. At least with it I can port the existing Desktop-based content pretty quickly for offline mobile consumption. The styling and layout is already fit out-of-the box to my need. I can strip the existing Javascript and CSS references and make the content use things from Bootstrap. There is still some labor work on the porting but doing on top of a good foundation makes it more manageable.
Diposting oleh
Hafiz
di
Wednesday, September 25, 2013
0
komentar
Thursday, September 12, 2013
JEdit : One Text Editor to Rule Them All (Functions and Platforms)
Any programmer would say his favorite text editor is the best one so I won't bother saying which one is best :). However, I do use one text editor, JEdit, for quite a long time already and find it a really useful text editor. Below is some of the reason :
- It does "everything" I can think of and more. It has a rich plugin list and so far I haven't find any of my needs that is has not met. Apart from coding which I do mainly on IDE, I use JEdit for the rest. Editing and Viewing binaries with it's Hex editing plugins, Editing XML even using it as a full-fledged IDE for some language e.g: Ruby, Python.
- It runs on all Platform. One of my main priorities of text editor is it needs to to be able to run on OS that I use. I did works on Windows, Mac and Linux so having text editor that can run on all of them is a big requirement for me. It saves a lot of time to be familiar with one advanced text editor and can run it on all system. The time you spend customizing the configuration, learning the shortcuts will pay off really well.
Diposting oleh
Hafiz
di
Thursday, September 12, 2013
0
komentar
Label: system
Wednesday, September 11, 2013
Code for your future self
It's quite annoying to work on existing code that you find hard to navigate and understand. It makes you spend some significant time first to understand the existing structure before you can finally add the feature or fix bug you intend to do in the first place. It does not have to be the code written by someone else, even your own code can give you some hard time when you revisit it again at the later time.
That is why the importance of writing good code is not just so the features runs well and the code looks good to your peer. It is also for your own benefit to have the code done in a well-designed and intuitive way at the moment you wrote it.
There will be temptation to code something quickly when deadline is approaching or you just feel lazy to extract those abstraction that you find. For your own sake, resist them and write code properly in the most natural and the most obvious way you can think of it. Your future self with start with that kind of intuitive thinking before he jump into specialize cases, workarounds and other tricks.
Here is an example of the things you can do to minimize the pain of your future self coding session :
- Choose good naming. This is simple and highly essential but easy to break at the time when you feel lazy or under pressure
- Have all the dependencies locally and self-contain whenever possible. For all dependencies that you can not put locally, put detailed documentatio on how to get it
- Automate and simplify the build system. Again document unscrypted steps extensively
- Make notes and diagram on general architecture. Give high level diagrams and don't forget to update them when it no longer reflect the actual code. Do not go into too much detail on this. Focus on describing the big picture of architecture on the notes and diagram and let the code speak for itself whenever it can
Diposting oleh
Hafiz
di
Wednesday, September 11, 2013
0
komentar
Label: coding
Tuesday, September 10, 2013
Focus on Personal Workflow and System, Not Gadget and Apps
Gadgets and Apps are abound today and the discussions that runs mostly are about what Gadgets can do this and that. I think many times the focus are misplaced. Gadgets are just tools and what is most important is the personal system workflow that a person has. Without that, gadget has no context and will just be a distraction with each additional feature. However, when you have system, each feature on the gadget can use to improve certain aspect of that system.
When you have a workflow involving calendar and reminder, a good calendar app can make that part of your system more optimal and in turn will make the overall system runs better. However, when you don't have need for calendar in your personal workflow (which is not a sin, BTW :) ) it will be just a toy to try a little bit and never used again or worse you keep keep wasting time using it without adding any benefit to your system.
So, I guess what matters is what system that you have and what combinations of gadgets and apps that can make it runs better. Researching new gadgets and apps can be useful if you use it to see how you can improve your existing system with it.
Diposting oleh
Hafiz
di
Tuesday, September 10, 2013
0
komentar
Label: system
Monday, September 09, 2013
Winforms C# : Prefer initialization in constructor instead of Form_Load event handler
On Windows Forms, I have been doing initialization of values on Form_Load event handler. I use constructor mostly for make instances of member variables and setting basic/default values. I did the rest of the settings e.g: config, last state, on Form_Load. It turns out that it's not actually a best practice to do so.
I've just stumbled upon this discussion on Stack Overflow that explain that it is actually better to minimize the use of Load. In summary, here's the guideline on Constructor vs. Load issues :
- Initialize things on constructor
- Only use Load for code that needs valid windows handle e.g: code that requires the window size and location to be known
- Override OnLoad instead of using Form_Load event handler. This ensure more deterministic order of execution in relation to parents OnLoad call
Diposting oleh
Hafiz
di
Monday, September 09, 2013
0
komentar
Friday, September 06, 2013
When You Know Better, Code Better (In the meantime, code it the best you know how at the moment)
There is a good, albeit very short, article on Lifehacker titled "When You Know Better, Do Better". The important take of the article is actuall the message "Do the best you can with what you know now".
There is always a better way to do anything. If we got preoccupied wondering if this is the best we can do right now we'll get paralyzed and nothing will get done. Even worse, when we finally decide to take action anyway, we might take less optimal approach due to self-doubts.
I think this is even more apparent in programming world. There are literally thousands of choices available for us to solve a programming problem. From libraries, frameworks, patterns, languages, text editor, diagram tools, we will probably won't do our best work if we agonize over what is the best that is available.
Referring to the advice above, we could focus our search for the best on what we know already at that time. We will learn new things along the way and at later moment we can do our best again with our knowledge at that time and repeat. I find this quite liberating and help a lot to minimize the noise on the head while coding. I can focus to produce the best work with what I know at the time. I'll do better when I know better.
Diposting oleh
Hafiz
di
Friday, September 06, 2013
0
komentar
Label: coding
Thursday, September 05, 2013
Diagram Smell and Refactoring
My use of UML for reverse engineering the existing code perhaps the same amount as my use of it for designing codes to be written. They both server the same purpose though, to give me insights on what to do next on the code. On reverse engineering case, it sometimes reveal certain connection that does not look right. There is a term Code Smell, so perhaps this could be named Diagram Smell.
The same as Code Smell where you see/feel something unpleasant on the code e.g: conditionals that looks like stairs, duplications everywhere, diagrams that is not pleasant to see and draw could hint part of the system that is not optimally structured.
Below is an example of diagram that looks suspicious :
Sometime, when I encounter the construct as above, there is a superclass that is waiting to be extracted. The code can then refactored that when reflected to diagram can be seen as below :
Of course, visual can be subjective things. Some people might not like the picture above :). However, I think we can now "understand" the nature of Class A and Class B better. We can also see more naturally their connections with the related helpers. I like things that could add the understandability of the code, it will ease maintenance in the long run.
Bad-looking diagram does not always means bad code though. It just a hint for us to look more at the code in case there is potential problem to be fixed. It could be the code is already in good condition while we draw diagram from the wrong understanding of it.
Diposting oleh
Hafiz
di
Thursday, September 05, 2013
0
komentar
Wednesday, September 04, 2013
Book Notes : Paradox of Choice by Barry Schwartz
I have recently finished reading "Paradox of Choice" by Barry Schwartz. Below is my personal notes of it.
The book is centered around reminding us on how the larger number of choices does not always means more happiness. It is true that low number of choice is limiting and certain number of choices can empower us. However, when the choices has grown large several factors started to come out that could limit our effectiveness to utilize those choices. Factors like regrets, opportunity costs can ruin our lifes as much as, if not worse than, the lack of choices.
Regarding the above issues, the book can be quite repetitive. It discuss the same matters several times although using different studies and perspective. I am already quite convinced that too much choices is problem by half of the book, so the additional facts add little to it although still quite informative. The book finally closes itself by summarizing some things we can do to manage the explosion on the number of choices to our advantage. It discusses the "trick" along the previous chapters but it gave one chapter to lay it out in a summarized format. It is useful for reviews and make some plan of action.
Below is some of what you can do when faced with choices so you can utilize it optmally :
- Choose when to choose. Decide on which area the choice is important and then spend time energy to make a good choice there. Still, limit the number of choice, so you can choose effectively. As for other areas, just stick to safe defaults.
- Be a chooser. Have time to reflect and not being pressured. Can choose to not choose and create new options and opportunity instead. Decide substantial goal and evaluate choice based on it
- Satisfice more and maximize less. Choose things that is "good enough", fulfill your needs and be happy with it, do not worry about loosing the ultimate best, it might not worth your time
- Think about opportunity cost of opportunity cost. Do not worry too much about what you miss
- Make decisions non reversible. You'll regret less
- Practice an “Attitude of Gratitude”
- Regret Less
- Anticipate Adaptation. Be aware that you will finally get used to what you choose. It might not get as exciting as you experience initially. Remind ourselves about the intrinsic quality of the choice that we have made
- Control Expectations
- Curtail Social Comparison
- Learn to Love Constraints. Choices within constraints is better then having none or having infinite one
Diposting oleh
Hafiz
di
Wednesday, September 04, 2013
0
komentar
Label: book
Tuesday, September 03, 2013
Use Fody to Simplify INotifyPropertyChanged Implementation
I was looking for a way to simplify implementing INotifyPropertyChanged. The standard way was too noisy to my taste so it would be really nice if there is a way to simplify it. Early on the search I stumble upon PostSharp . However, it's quite expensive and seems to be a relatively big "framework" for just my simple needs.
I later found the PropertyChanged.Fody and it fits my needs nicely. It is free and works really well. You just need to install with the command below in NuGet's Package Manager Console
PM> Install-Package PropertyChanged.Fody
and you are good to go. NuGet will take care of installing the needed dependencies e.g: Fody. Implementing INotifyPropertyChanged is now just a matter of adding [ImplementPropertyChanged] attribute to a class. Very convenient.
Diposting oleh
Hafiz
di
Tuesday, September 03, 2013
0
komentar
Label: dotnet



