Tuesday, July 30, 2013

Review: Blogging on Blogger/Blogspot

It has a bit past half a year since I've seriously started blogging. During that time, I have almost 50 posts. I have gone through quite a few writing styles and still figuring out this blog's identity is.

Per the tracker, there seems to be more interest in the interview questions so I had tried to focus a bit more there. I started off wanting to answer the question as I would in a real interview. Quickly, I learned that I could not do this for all questions. This last month, I tried just blogging whatever I felt that day.

I have been blogging about more topics. I found it easier to write about something that I just happened to be inspired to write about rather than trying to mold a real audience. So, I return back to writing more towards my future self, although I will be probably slip up again. Remember to stay focused, future self!

I do reread a lot of my previous posts. I found a lot of grammatical and spelling errors. I tried to correct some of them but I have been doing less now because the general idea is there. I do correct some lines where it just does not make sense at all. I know some is because I am trying to type as quickly as I think of the ideas and sometimes the idea just go way faster, then you'll notice some thought gaps.

I get a lot of sources from very odd sites. I'm sure you'll see them when you blog. I do not want to publish them because it will just generate them more traffic which I am pretty positive that is the reason they do that. There is probably no way around them, but at least it makes me happy to see the visitor count go up. And at the same time, makes me feel kind of sad that I am somewhat superficial and do enjoy at least some level of attention.

There were a one thing that I would like improved in blogger (and it is totally possible that blogger can already do it and I just have not figured it out). I'd like to be able to create a page with links to blogs by certain labels, like interview (label:interview) or work-related (label:interview or label:work life).

So far, I enjoy this new part of my life. It does help me focus on certain topics and reflect on other topics. I've been thinking of writing some alternative answers to interview questions and counter points to other posts... but we'll see how things go.

Reference:
First Relevant Post (12/26/2012)

Monday, July 29, 2013

Review: Internet Explorer 10 (ie10) - My First Impressions

I have been testing bing a few times to see how things are on that front. The interface looks nice, but it was really slow on Internet Explorer 9 (ie9). By very slow, I mean that I have to wait 1-2 seconds. During this time, I cannot even click in the search box and type in my search while the rest of the page is loading the nice images.

I've been ignoring the message about upgrading to ie10, but I caved today to test if there is a difference. The first thing I noticed is the download page has a non-enhanced version. I am surprised that there is no explanations to what that option is. After reading a couple articles (ghacks), I stuck with the non-enhanced version.

Once installed, Bing did come up much faster. Time will tell if this slows down. I am also a little untrusting in why it is faster in ie10 than ie9 because it makes me wonder what else is windows doing in the background that I really do not want it to do.

I tried to search, and I get an error on the very first search. If I go back and try again, the search works as normal. Below is the error that I got:

Bing services aren't available right now: We're working to restore all services as soon as possible. We know you want to get back to searching. Please check back soon. (Ref A: DCCFEF37C40C4E0B9A21AE8EE668A44D Ref B: 48D526FF966620D8DA93A2AD8235794B)
Besides the minor error, I do not see any real difference than what I see with google for my use. It defaults images to the top. It does not have ads (which is a plus as an interface), has other popular searches and related searches. But, the search results appear very cluttered. I'm surprised even thought my screen is 24" that bing only uses half the screen. I do not like the constant reminder to connect to Facebook. Why is there no option to close it?


Cooking: Different Types of Cutting Boards (Wood vs Plastic/Synthetic)

For a budget conscious newbie chef, the cheaper one is sufficient for the job to be done. You may consider spending a little more for a wood and synthetic combination (wood on one side and synthetic on the other). I researched the different types just to see the pros and cons to see if there is any real value differences for a green chef.

As for health, I did not find the arguments to choose one over the other. Scientifically, the synthetic can be proved about the germ count. Science could not prove that wood is bad for you although it could not be proven. I also cannot refute the long history of wooden boards. On the other hand, synthetic still gets cut up so who knows if micro-bits of the synthetic material gets in the food? I did not find any article that discusses this risk but I think there are greater risks in the frequency of eating greasy, fried, and other unhealthy foods.

As for cutting experience, they both seem to be about the same although it may have been slightly easier to cut through foods on the wood. Synthetic does seem to move around more when I cut certain foods. I feel more likely to chop harder on synthetic because psychologically I think it can take more force than wood. Although not possible, I am still afraid that I may just split the wooden board.

As for maintenance, both seem to be cut about the same amount. Synthetic does seem to stain more, so don't expect it to always return to its original color. I tend to over-clean the synthetic because I keep thinking that the stain will even fade away if I do but doesn't appear to be. The wood cannot be left in water which is not good if you have a tendency to leave things in the sink. The board gets especially warped if it is one of those wood and synthetic combinations when left in water for a long extended period of time.

Overall, I like a bigger and heavier synthetic cutting board if price is not considered. Grooves around the edge is nice for meats or foods that contain liquids. I do not like having holes for easy handle or storage because it makes the board larger but not my cutting area. Cosmetically, I like wooden boards when in storage but prefer a plain white board because it is easier to see the food. If anything, I'd like to have a ruler on the board. I have not seen that design.

Reference:
http://reluctantgourmet.com/tools/cutlery/item/268-cutting-boards-wooden-or-plastic

Sunday, July 28, 2013

Cooking: Bluefish, Basa fish, Eggs and Tomatoes

This is my first post on cooking. I will admit that I am pretty bad at cooking particularly for other people. There are maybe two other people who didn't mind eating my food... and they practically eat anything. I also easy practically anything so I have not minded my own cooking so far.

But in the light of wanting to try to cook for other people, I have started to "experiment" with my cooking. It is very hard for me to follow recipes because I do not like not knowing why I am doing certain steps. So it is not that I cannot follow recipes but I spend a lot of time thinking "why 2 tablespoon," "why 1:2 ratio," "what's a scallion, can I use green onion," etc. That is very frustrating to me.

Up to this point, I have basically "water fried" my food. In other words, I basically stir fry but in water. I've been told my food is very bland and tasteless. For me, it tastes like the food that I am eating. I have not used any salt or pepper, so I basically would have the same container since a decade ago if my family didn't visit and use the ingredients. I am still amazed how quickly my mom can go through my ingredients in just a couple visits. So that is about how much seasoning I put into my food.

Even though I eat out quite often, I still find most of the food too salty for my taste. It always surprises me when people add more salt to the food.

I do have some experience with some dishes with pre-made spices like spaghetti, curry, and stew. I've tried to make chili once, but it tasted more like beef and beans than what I knew as chili. Anyhow, I started playing around with some of the foods to figure out the different tastes in dishes. My primary dish is the eggs and tomatoes which I have tried different ratios of sugar, vinegar, and salt.

Eggs and Tomatoes
I use about the ratio of 2 tsp of sugar, 1 tbs of vinegar, 2 eggs, 2 tomatoes (or 4 roma tomatoes), 1 tbs of salt. This probably is a little more sour than what most people would enjoy, but I prefer it this way. Or if I had better tomatoes, then I would not need as much vinegar. Salt seems to enhance the flavor without having to add more sugar or vinegar.

Fish
I have only cooked fish maybe 5 times in my life. I do not even know what fish they were. My guess would be cod or tilapia.

I was at the supermarket and felt adventurous. I bought two kinds, Bluefish (local wild) and Basa fish (farmed) . I had absolutely no idea what kind of fish they are. I got 1 fillet of each which turned out to be 2 lbs of bluefish and 1 lb of basa fish.

I basically just water fried the basa fish. 5 minutes on one side at medium heat (lvl 7 for my stove), then flipped 5 minutes on the other side. I ate this with rice and turned out very nice for me. Very light texture compared to the blue fish.

For the bluefish, I cooked half the fillet. I used the same process as the basa fish. Fortunately, I am used to eating fish because there is a bone in the center part of the filet (later I found it is only in certain segments). The bluefish was much meatier. I tried to look up fishy taste, but I think it tastes a bit fishier too but not in a foul smelling way. It is a taste that I would associate more with a fish market. It tastes a little drier than the basa so I'm not sure if I overcooked it. I still enjoyed the fish though. The texture is a little like cooked salmon but different taste.

I cooked the second part and experimented with ginger, salt, and pepper. I cut the fillet into several segments and used different ratios on each piece. I still have not quite figured out what ginger does to the food. I either do not taste it or it is too strong. In this case, I could not taste it with the fish. I added it to the top of the fish, maybe next time I should leave it in the water or oil.  I am not sure that I like pepper on the fish. It tasted separate. Salt made it taste less fishy. I could probably add more than a sprinkle of salt to the fish next time. The last piece, I added after I cooked it to spaghetti sauce that I already had made before grocery shopping. I used a fork and broke it down into smaller bite-sized pieces. This turned out really well for both the fish and the pasta (which does not have meat in it).

Conclusion
I have a long ways to go with cooking. Feel free to give me any advice on how to start cooking.

Saturday, July 27, 2013

Life: Why we enjoy certain foods but not others?

For a long time, I could not understand why I like certain foods for the same reasons someone else does not like the exact same dish... and vice versa. A lot of it explained in the article I read (provided below). It does not quite explain some exceptions. I think there is also non-food psychological reasons to those.

For example, I do not like root beer. I think the reason is that the first time I had it was because I thought it was Coke or Pepsi, and it just tasted completely "wrong" that I just cannot shake that experience.

On a similar note, 粽子 (zongzi) has always been savory. The first time I had a sweet one, I literally bleh'd the food out of my mouth the instant it landed on my tongue thinking it went bad. Fortunately, no one saw me do this as I was a guest at someone's house. I politely asked my aunt what it was, and she laughingly explained that it was supposed to be sweet (common to that region). I did grudgingly eat the rest of it... but it was so difficult to do so with a straight face. A month later, my aunt found a place that served the savory version and served it to the same group. To watch the faces of everyone was exactly how I thought mine looked like when I tried their version. I haven't quite reached 10 times, so I still struggle eating the sweet version. It'll probably be a lot more since I prefer savory over sweeter foods in general.

I also have a cousin who hated vegetables when he was a kid. He had a natural regurgitation if vegetables entered his mouth. My mom had a way with kids and disciplining them (including myself). The only time he ate any vegetables without problems is when my mom was around. Once she is not around, he reverts immediately back to throwing up the food. My mom's trick was that if you didn't like it, you had another serving... and repeat until you ate it. Today, he eats practically anything and way more nutritionally than his younger version.

For me, I learned to eat mushrooms, garlic, bamboo shoots, and 木耳 (mu er, wood ear) after high school. I've had them on several, several occasions before and not exactly sure when I started not disliking them. I still remember when I did not like mushrooms. It still puzzles me how I can have two totally different experiences with the same texture and taste. That fascinates me to no end how there is so much my brain cannot comprehend about the body.


Reference:
http://io9.com/the-psychology-of-hating-food-and-how-we-learn-to-love-476720251

Wednesday, July 24, 2013

Review: MS Visio 2010 - End Text overlap, unable to move text

This complaint is that I still cannot find a way to move text attached to connectors (i.e. links, associations, etc.). I always resort to hiding all the text and using a generic text box which is much easier to handle and update. I just do not understand why MS Visio just cannot do basic tasks well. 80% of the work uses the same basic components.

1. The default endpoint text is only four characters long, and already overlaps if two connectors are next to each other (see End5 - End8, or yellow highligh). If you try to rotate, the rotation is static to a certain rotation point.

2. As you can see in End11 (blue highlight), this rotates into the box. Makes me really thing how Microsoft even tests these functions. How is this not obvious during a development test, system test, user acceptance test, or any other test?

3. If you rotate the text all the way around for End9 (red highlight), this will overlap with the other end text if the objects are too close. Not only that, the text is inverted in reference to the other endpoint (End10). I do not know whether I am more surprised that this did not bother anyone in testing either or more surprised that there are some people who cannot read sideway texts without moving their head.



On top of that, connector names are not defaulted to show. Even if I show, it is static and cannot be moved or rotated. It's auto-draw of connectors is pretty poor. And this does not come with the office suite, so there are extra securities I have to go through to get Visio for work.

If you are looking for a free UML designer, I've used ArgoUML in the past and found it satisfactory. There are pros and cons compared to Visio, although it has been several years since I last used ArgoUML.

Monday, July 22, 2013

Coding: JavaScript - Single Var vs Multi Var

I came across an article discussing Single-Var vs Multi-Var declaration for JavaScript. I am almost always for multi-var pattern from experience.

Programming from scratch, I do not particularly care for one pattern over the other. Some argue one looks better than the other. That is a personal preference. Single-Var promoters say it saves space, but most people tab it to the same level as the other variable names which defeats the space saving (unless you compress the file, then maybe there is an argument there). Even then, space is so irrelevant today because either the program is so large that the difference is insignificant or so small that systems today are so advanced that no one will even notice the minuscule delay.

Having to deal with troubleshooting, debugging, and reading through thousands of spaghetti-code, multi-var has so many more advantages. You cannot assume process when debugging or troubleshooting because if you are troubleshooting an issue, you are looking for a problem. On the same note, you cannot assume strict is being used. Also, developers may easily assume others can pick up the code easily or be aware of certain standards but not everyone is like that. You also do not know how many people the code has gone through or even how many companies.

There have been plenty of codes that I had to debug due to a variable not declared properly or even just misspelled. There was a code I had troubleshot because someone used an I instead of l or maybe it was a 1. Who is going to notice an upper-case 'i' to an lower-case 'l' to the number 1 when skimming through hundreds of lines of code?

Another use of declaring multiple vars is also to find where the variables are declared. Sure you can have IDE. But if you find yourself having to troubleshoot in unfamiliar environments, this makes a world of a difference to navigating through code with a simple text editor with a word find (or find word within a library of files). Even if comma-first, you then have to search for both comma-first and with var (in-case it is the first variable in the list or a parameter to a method/function or a different variable on a different block level [scope]).

For any advanced debuggers (I assume advanced developers), the cosmetics of tabs, alignments, etc., is barely a nuisance. At some point, I can read both styles easily without complications even if they were multi-line or single-line or case-insensitive.

So if there was an opinion to be made on this topic, it should be the people who are going to maintain the code after deployment. Developers have a project plan. Troubleshooters are expected to fix the problem yesterday. Time is more valuable to them than developers. No matter how experienced developers are or how mature the procedure may be, errors are human-nature.

Ultimately, either is acceptable. To me single-var would be like the developers leaving the power button in the back of the computer. You don't have to see the button and closer to the power supply which means no extra wires in the case. When was the last time you seen that design (the design did exist for those of you too young to have seen them)?

Reference

Kent Dodds - https://plus.google.com/u/0/114245123507194646768/posts/dnRkxWyQ4fM
Ben Alman - http://benalman.com/news/2012/05/multiple-var-statements-javascript/
Dan Hough - http://danielhough.co.uk/blog/single-var-pattern-rant/

Updates

3/12/2014 - Added two more references which support multi-var patterns. Ben Alman does a good job describing work-arounds to the advantages of single var pattern. Dan Hough does a good job explaining preventing errors and simplifying rafactoring. I like the addition of the refactoring which also expands on code maintenance.

There were a couple posts on the use of 'use strict'. For someone maintaining code, you may not always have access to modify code. Also, there are times working in a corporate environment which you may not even be able to install your choice of IDE or add-ins. Using multi var pattern is much more helpful for programmers supporting old code. Especially with javascript where code can put interjected in out-of place areas or written by untrained programmers like web designers.

Thursday, July 18, 2013

Game: Candy Crush Saga... rigged?

How I started:
I started playing this because everyone my circle of influence was playing it. It has become popular to the point where my mom and aunts were also playing. They often get stuck and somehow they make the connection that a software engineer (aka "computer guy") can help with these "puzzles." Of course, I do not help the stereotype by actually beating it in a couple minutes while arguing (in a very nice, respectful way) that they should not make such assumptions.

Gameplay:
The game is pretty easy to learn. It is a rendition of piece swapping games like Bejeweled except in puzzle format. Unlike a puzzle, there is not necessarily a winning scenario kind of like solitaire or mine sweeper. There are some rules that you have to figure out as you go further into the game. Each stage introduces a new challenge with rare exception.

My status:
I am currently past 410 with currently 440 levels. I did not spend any money and will never spend money. I have been stuck on certain levels for several days. I finished the first 100 level within a day or two. The next 200 levels within the next week. Some of the last few levels took several days. I am close to not playing this game again partially because of the reason below and partially because the game is reaching a new level of boredom. 

Rigged?
The game is not rigged as some people states in other blogs. There are strategies you can use to improve your odds of completing the levels, especially the first 200 or so levels. The different boards and obstacles are standard game-play for games. I am ok that this game does not guarantee a winning scenario. In other words, you can hit a streak of bad-luck which makes it impossible to beat the level. 300+ levels, I had to play some levels several times (there is one which actually depended on the right combinations just to get enough points).

What I dislike about the game is that the falling pieces are not proportionally random in my opinion. Especially in the later levels, I have noticed that there are more combinations from falling pieces if you have a special candy within its range which often triggers the candy prematurely. I rarely get combinations if special candies are not present. There seem to be some AI to the chocolate, candy drops, and tornadoes.

There are some glitches that I have not quite pinned down. I think there are some situations where the special candy gets triggered even when not matching in color. It appears to trigger just from falling due to other matching colors in the vicinity. I thought it may be because there is a new match, but I find it unlikely that I would fail to see that every time. Also, this only occurs at certain times that is needed to complete the game. Chocolates and licorice seem to generate with uneven regularity. The latest level introduces whirlwinds that seems to have a particular algorithm to where it moves too. There is an actual bug where the game gets stuck too (particularly when I am doing extremely well).

In conclusion, I think the game is developed to favor certain scenarios to cause higher odds of near failures. Although not impossible, the algorithm does leave some room for a chance to win without making it too obvious. What I do not like about this game is that the appearance of fair chance is not the same as the actual game engine. It does this by making the game fool people with the early games that skills are required. I do not like that the game tricks people's perceptions on the fairness of the game no matter how legal the practice may be. If you are ok with that condition, the game is fun to play and free. 

Bug/Glitch?
Below is an image of Candy Crush Saga glitches. Tornado does not destroy pieces and just gets stuck there. The only options to get out of this is to either end the game using the option at bottom left or refresh the page. This seems to come when I successfully use the pink ring in a productive manner. I feel sorry for those people who purchases power ups and then gets wasted on something like this.

Update 

8/3/2013 - Currently on level 438.
8/11/2013 - 447
8/13/2013 - Completed 455
9/24/2013 - Completed 485; added Need help section
10/15/2013 - Completed 500; stopped playing
http://douglastclee.blogspot.com/2013/10/game-candy-crush-saga-addiction.html



7/13/2014 - Started playing again about a month ago to test out Camstudio, then just continued playing Dreamworld.  D:
8/7/2014 - Added video link

Need help?
I was trying to find an article to see if anyone found how the tornadoes move, but stumbled across this link which I thought some reader's may find helpful.
http://flickrshare.blogspot.com/p/candy-crush-saga.html

Videos

http://youtu.be/BMPIoHGpV7U - Candy Crush Saga 634 with Broken Black Swirly Licorice

Similar Posts

Friday, July 12, 2013

Interview: What was your biggest failure and who was responsible for it?

What was your biggest failure and who was responsible for it?

There are actually two that I always think back on, but I'll explain the one that I actually had more control over. The other was not in my control and is a much more complex story to tell in an interview.

There was a person that I was just unable to train properly. I failed to get the new team member to do the work effectively and with a certain level of quality. But the biggest failure wasn't that he was not able to do the work because I have already trained several others with less effort. Although I hate to use the excuse, the new member did not have the potential to do the work.

He hurts the team on many fronts: our public image to other teams and departments, our morale to cover his errors, and spending more time correcting his errors. I did something that I had never done before which was to write a message to my team lead that we could not afford to keep on our team. I even sat down with her and explained my reasoning. Unfortunately, there were high powers that prevented my recommendations.

Even after about a year since he started (I was only 6 months when I trained him), I still do not think he meets minimum effectiveness nor quality. I pride myself on finding solutions to problems, so this seems like a huge failure on my part to either find him the proper role or off our team. I have been forced to accept the situation in part because my own performance was impacted by helping.

Edit: This was a longer story which I had edited out.


References

What's your greatest weakness? - I thought this was an interesting read
http://www.linkedin.com/today/post/article/20130709020109-52594-answering-the-question-what-s-your-greatest-weakness

Wednesday, July 10, 2013

Interview: I'm not sure you're a fit for the role...

I'm not sure you're a fit for the role...

Although I have used this as an interviewer, I have not heard it as an interviewee. As an interviewer, I have not heard anyone rebut the statement. I really would not put much attention because those candidates really did not have a chance. I assumed that it would save us both time and hassle by letting them continue with their search without having to check back with us later.

As an Interviewee
But as an interviewee, I think there are two ways I could take this. In the interview, I try to put in time to interview the interviewer. I want to see if the company is a place I want to work at. There have been a couple companies where I did not want to join. In that case, I would have just said ok and politely complete the rest of the interview if that was not already the end.

In the case where I had interest and felt that I did decently well in the interview, I would have asked what kind of person they were looking for. They gave me an interview so I must have fit some criteria at some point. Depending on how the discussion goes, I would try to figure out more information. I would most likely not push hard to sell my abilities to the company... but then I am also not a sales person.

As an Interviewer
I am not sure if I like this approach to see how a person takes 'no' as an answer. The candidates have been in several interviews. They are already stressed about their situation. So, not all the candidates are going to play such mind games.

In my experience, most those people who naturally sell themselves usually decrease morale of the people around them. They claim more than they can do or they spend more time selling themselves rather than doing the work. They also target work that will only give them more selling points. This leaves all the menial tasks to the rest of the group.

Identifying those people are not obvious, but people will eventually notice. After a month or two, people will start to adjust their behaviors in a negative way. Once a few people start to get "burned" by those sales-y people, the situation will only get worse. Ironically, those who sell themselves also tend to get promoted because they appear better than the rest to upper management. When that occurs, I have found entire groups transfer, leave, or just quit in a short period of time. And because they care about their image, they are the type to keep investing in poor decisions in hopes that more money, time, or labor will salvage whatever is left which tend to also be at the expense of everyone else.

They are not all like that. The good ones are fewer in numbers and typically would not need to sell themselves on such statements. Although there are some, I find it hard to believe that they outweigh the bad. I do like the intent but I think there are better ways.

Reference:
11 Interview Questions You Wouldn't Think to Ask--But Should

Tuesday, July 9, 2013

Interview: What traffic sign would you be and why?

What traffic sign would you be and why?


Yield. I try to understand the project. If there is no traffic or completely new project, continue to move forward at a comfortable pace with respect to the speed limit or company regulations. If there is some traffic or people have already been working on the project, then try to fit into the flow with as little disruption as possible. Once in the flow, make small impacts to improve the flow.

I thought about Under Construction because I always want to be improved but it slows down traffic. I thought Your Tax Money At Work would have been funny. Welcome to [State] to "represent" my home state. Stop for auditors? Would be fun to make up a story for each type of traffic sign.

Reference:
11 Interview Questions You Wouldn't Think to Ask--But Should

Interview: You've seen the office. What would you change?

You've seen the office. What would you change?

I do not personally like this question as an interviewee. Although the question can be used to test someone's ability to an unprepared situation, but I do not like the uneasy feeling that the interviewer may also get free advice.

At best, I would respond that there are different pros and cons to every environment. If a change was needed, change needs to start from the top because typically the bottom adapts as best they can to what is provided from the top. So if there is a need for change, I would change the way I manage my boss.

Even then, the employer would not make my list of choices even if it were the only choice. The question makes the company seem like they do not value its employees. If they value their employees, then they did not hire them because of their skills. If they valued their employees and employed skillful employees, then they would not need the free advice... imo.

Reference:
11 Interview Questions You Wouldn't Think to Ask--But Should

Wednesday, July 3, 2013

Scammish: Vehicle Protection Center Scam-ish (Take 7 of infinity)

Scores an F on BBB (7/3/2013).

As if it was not already hard enough to sift through all the junk mail, I came upon this letter that stated on the front "REQUEST FOR ACTION - IMPORTANT VEHICLE INFORMATION ENCLOSED" then in smaller text "WARNING: $2000 FINE, 5 YEAR IMPRISONMENT, OR BOTH FOR ANY PERSON INTERFERING OR OBSTRUCTING WITH  DELIVERY OF THIS LETTER."

Quickly looking this up online, I found several links:
1. http://www.flashesofpanic.com/panic/002609.php
2. http://getoutofdebt.org/48173/dont-be-fooled-by-this-vehicle-extended-warranty-mailer-from-vehicle-protection-center (has images of the letter that I also received)
3. http://blogs.clarionledger.com/consumerwatch/2012/10/02/beware-car-warranty-solicitations/

What a terrible way to attract my attention. I do not tolerate such gimmicks. I wish advertisers were required to provide the source of where they collect my information. I hope that would help me track where my personal information is coming from and also denounce that company for promoting such practices.

Update 1/3/2015

Interestingly, the BBB as of 1/3/2015 is now C-. Although, I still get approximately the same amount of traffic for this post so these mails seem to still being distributed.


Update 1/9/2020


I haven't received any since this post, probably targeted to those who bought a new car which I will likely be doing soon. 

Interview: Can you put this deck of cards in order?

Can you put this deck of cards in order?


I wish I had this question in an interview before I read the article because I am not sure how I would have reacted to this question. I have a slight feeling that I may have just sorted the deck right there because it was something I used to enjoy doing when I was bored at some random place that had a deck of cards way back in the day.

On the other hand, I should have had enough experience to know there is something else that the interviewer is looking for. What order? Why do you want me to do that? Are you crazy? Ok, maybe not the last question but still probably better than just start sorting in silence.

Unfortunately, I read the description and it spoiled what I should not have known. What I like about this question is that this is actually very common type of request from "clients" in any industry. There are three main questions that needs to be asked: time, quality, and cost.

1. How much time do I have to sort the deck?
2. How well do you want the deck sorted?
3. How much are you willing to pay to have the deck sorted?

Most people's questions will probably revolve around quality. How do you want it sorted? So I would figure if you asked questions that answer the other two, you'd be ahead of the competition.

On revisiting this question, I think it would also be good to also demo certain sorts even if it is very simple to explain. For example while asking the interviewer (treated as a client) how they want it sorted, I would suggest some alternatives. "Perhaps you would like it sorted by suits" and separate the cards into 4 piles of the different suits. "Perhaps you prefer it sorted by odds and events" and separate the cards into 2 piles of evens and odds. When reaching a face card and ask "how do you want to treat face cards?" Maybe at the end show a card trick.

Reference:
11 Interview Questions You Wouldn't Think to Ask--But Should

Tuesday, July 2, 2013

Interview: Can you make a function that determines whether a string is a palindrome or not?

Can you make a function that determines whether a string is a palindrome or not?

I like this interview question. It is a simple question but gives the interviewer some leeway on how to manage the question. On the other hand, the interviewee also has some opportunity to show off without having to spend a lot of time.

The first part is knowing what palindrome means. If the interviewee knows, then they easily skip to the second part of finding the solution. My guess is that most people do not know what that means. In this scenario, I would imagine there are people who would guess what it meant and continued with a solution hoping that they guess correctly. In another, the interviewee may just admit that they do not know what the word means. The length of time and how you say it could say quite a bit about what kind of person you are. Eventually, the interviewer will provide the definition.

The next part is to explain how to create the function (not "yes, I can make a function..."). Depending on the job, the level of detail may be different. Basically there are two common solutions (in my limited world): 1. create another string in reverse order then compare if the two strings are the same, 2. compare each letter from start to end with the opposing letter from end to start.

That may be sufficient for most non-programming jobs. For programming jobs, interviewees are probably expected to be more elaborate. They can provide alternate solutions, improving their proposed solution (refactoring), compare different algorithms, etc.

Personally, I like this question as an interviewer in that there is a lot of information that you can get within a short period of time and most interviewees will be able to answer the question. Also, I found it surprising how many candidates are incapable of answering basic questions. For example, I had one candidate with a BS in Computer Science who couldn't explain a loop. Another example, I had to train a new hire who supposedly has been in the IT industry for several years and has several MCSE certifications who asked how to create an object from a class. (Sorry for the CS lingo... it basically translates to a carpenter not knowing how to use a hammer)


Reference:
11 Interview Questions You Wouldn't Think to Ask--But Should