Category Archives: Technology

Life with Android Wearable – LG G Watch

It has been almost one month since I bought LG G Watch, and I am happy with how it is changing my daily life.

LG G Watch is a gadget rather than watch

The purpose of buying this watch is really just to try out how it is like to have a wearable gadget rather than getting a nice watch. And of course if I have some good ideas, I can use Android wearable API to develop apps that make use of this new technology.

Appearance wise, it really look more like a gadget-on-the-wrist rather than a watch. Wherever I go, people who notice this will instantly recognize this as something that has much more functionalities than normal watches. The watch performed beyond my expectation in terms of functionalities that it provides. In fact, my friends often joke about what happens if I wear this into exam venues.

More useful than I thought

Some functions are triggered by the events that happened to the phone, these are most likely notifications. The phone sends the notifications to the watch, and then the watch would display them in a nice way. By default, firstly, there will be a card(similar to Google Now on the phone) at the bottom of the display, swiping up will show the main message on the screen, then swiping to the left will show another screen that allows you to open the corresponding app on the phone whereas swiping to the right will dismiss the notification. This default behaviour is not very useful, so the apps that want to take advantage of the wearables need to implement more actionable screens for the users. For example, for the updated Whatsapp, the main screen shows a list of conversations, you can see the full details of each conversation if you swipe to the left once, and you can also reply via voice input by swiping to the left again. However, others told me that it looks very weird if someone is staring at the watch for longer than 3 seconds, so better check long messages on the phone.

Other than reading chat notifications, the function that I use the most is agenda.

IMAG0603

By default, today’s events on the phone will be synced to the watch and displayed as a agenda card, swiping up will show more details such as venue, additional notes. Believe it or not, this saves a lot of time and frees up my hands from taking out the phone, especially on a crowded bus or during cycling.

It also comes with a simple step counter to record how many steps you have walk everyday.

IMAG0607

You can set a goal and motivate yourself to walk more rather than taking bus. Personally, I find it pretty effective. There are times that I wanted to take a bus but decided not to after looking at the step count. (My goal is set to 10k steps every day)

Voice control system is very important for the watch, most self-initiated actions are via the voice control. Saying “Okay, Google!” will trigger the voice control. It may not be able to match Siri as a personal assistant, but there are still a lot of things that you can do, including setting up reminders, sending SMS and email, calling someone, asking a question or just simply performing a Google search. Apart from the default commands, “start XXX” will trigger apps that are specifically developed to run on the wearable device.

Other cool features are music controller for the phone, navigation(with google map).

Update: Recently in December 2014, the music controller is updated with useful functions to control volume and go to next or previous track. The UI is also pretty good.

[Solved]Get back Grub in Windows 8.1

I was using grub to dual boot my Lenovo Y410P with Windows 8 and Ubuntu 14.04.

Recently I finally decided to upgrade my Windows 8 to Windows 8.1 considering it should be pretty stable by now. However, to my horror(or rather not surprisingly), my default bootloader has been changed to Windows Bootloader which means I could not access my Ubuntu 14.04.

Usually this takes a while to fix, involving repairing grub/BCD and tend to be tedious. However, I managed to found a much simpler and direct solution to this.

With the new UEFI specification, we can actually choose the default boot manager instead of replacing one with another. All it takes is to go to UEFI Firmware settings and change the order of boot managers. Which means grub and Windows boot manager can co-exist somewhere in the hard disk and we can choose which one to use in the BIOS UEFI settings.

Accessing UEFI settings in Windows 8.1 is a bit different from what happens in Windows 8, you can follow these links:

http://www.thewindowsclub.com/access-uefi-firmware-settings-windows-8-1

http://acer-au.custhelp.com/app/answers/detail/a_id/32048/~/accessing-uefi-in-windows-8.1

The menu is something like this:

UEFI Settings

UEFI Settings

One you are in the UEFI boot priority settings, you can simply change the position of Ubuntu to the top so that grub will load when the PC is turned on:

UEFI Boot order priority setting

UEFI Boot order priority setting

(All photos taken by me)

 

 

Programming concepts in real life – Algorithm

This is the second post on the series of interesting thoughts of “programming concepts in real-life”. Today it occurred to me that one fundamental concept of programming – algorithm, is also heavily used in real life outside the IT world.

What is algorithm

Algorithm is a step-by-step procedure for calculations.

Algorithm used in programming

There are a lot of examples of algorithms in programming, the most basic ones include  breadth-first search (BFS) and  depth-first search (DFS).

Algorithm in real life

Algorithms are applied in our everyday life.

DFS/BFS (Depth-first-search/Breadth-first-search)

For example, for a freshman who just entered NUS, he may choose to study the area of his interest, such as marketing or psychology. He can do this in two ways, one is to really devote all the time and effort into this area and do nothing else for a very long time. So for marketing, he/she will be learning introductory modules on marketing, intermediate modules on marketing, advanced modules on marketing or even do a research on marketing. Only after he/she feels there is nothing else to do on marketing, then the person will consider other options. And surprisingly(or rather not surprisingly), this is exactly the concept of a particular algorithm called DFS. In DFS, you prioritize depth more than breadth, so when you have a chance to go wider or deeper, you will go deeper first.

And of course you can see how the opposite algorithm BFS works for real life. That is when a person takes all the introductory modules for different areas, however after all that still indecisive enough to make a decision for specialization. So he/she would take all the intermediate level modules for different areas and so on. This may work very badly for a freshman but the concept is similar to a liberal arts curriculum, where students are exposed to different disciplines for 1 or 2 years before they decide their major.

Amortized complexity optimization – CS3230 lecture on 13 Feb 2015

We use amortized complexity optimization in real life, for cleaning our rooms. Normally we do not clean our rooms every single day. We wait for the room to fall below a certain cleanliness standard or when there is an important visitor, then we start cleaning the room. Cleaning the room is an expensive operation which takes a lot of time. Hence, by doing it infrequently, only when absolutely necessary, we reduce the total amount of work needed to keep our room clean.

This idea is similar to amortized complexity optimization in algorithm analysis, where we optimize the average runtime to achieve better run time.

 

Other algorithms such as greedy algorithm and dynamic programming are also practised in real life(often without being realized).

 


More of this

The best Friday Hacks session so far

Today I attended the Friday Hacks(#68) by NUS Hackers as usual. I knew that the topic today is on NUSMods, a web app developed by a SoC senior – Beng, that is extremely popular and successful in NUS, and there will be a guest Jeff Moss who is a famous security expert. It turned out both talks were interesting and meaningful.

For the first part, Beng mainly talked about the history and design philosophy of the NUSMods. It was an inspiring story considering that he did this in year 2 and the web app went through a lot of changes before it finally become successful and popular among NUS students. In particular, the part on designing the app is interesting, he talked about “hackers who can design the app well enough is as rare as unicorn.” And I found this to be relevant. Sometimes the app may have the best functionality but the poor design may not attract the users or simply render the app unusable. Luckily, there are some books on design philosophies that are useful in designing apps. I figure that I should take a look at them when I have free time and before doing some serious web project. He also mentioned about the future of NUSMods which includes some APIs for new developers to use the data from NUSMods as well as using NUSMods’ existing popularity to transform it into a platform for displaying other apps relevant to NUS(taking the interpretation of NUSMods as NUS Modifications). These ideas may be relevant for me when I do my future projects.

The second part of the session was a short Q&A session for Jeff Moss and some of his colleagues. A lot of insightful questions ranging from personal security, NSA’s surveillance, issue of trust and prospect of computer security were asked and the reply given by the pros were very informative and insightful. We learnt about how strange phenomenons may be related to NSA’s surveillance programmes, the prospect of post Edward Snowden era for computer security. Some even drilled into the fundamental issue of the extent of trust we should give to others. A good point is that in IT industry, we have to ultimately give our trust to some strangers. It is not possible for us to build a functional computer, or in similar sense a full range of software. Hence, whatever we do, we need to trust the other people who developed the building blocks for the technology that we are using, be it the operating system or the processor.

On Google again, with DuckDuckGo

A few days ago I posted a blog about how important Google really is, as a search engine. Apparently I was not the first one to discover that Google is not that great after all.

It turns out that there is this search engine called DuckDuckGo that existed for several years. I read it on Hacker News and here is a link about it.

Basically, it offers instant answers to the queries instead of links to other websites, although the instant answers are from other websites. Google apparently has similar features now so that is not really the most important feature of the search engine.

This search engine put much more emphasis on user’s privacy. It does not track search records, or IP addresses, it also has no user account system. Hence, it became quite popular for privacy-conscious people.

Anyway, I learnt something today and hope it goes well for this DuckDuckGo. However, I prefer to stick to Google for the exact opposite reason: It has my data. I believe in the customized searching experience in Google based on my profile, although it often means I need to see ads that are “relevant” to me.