Logitech M510 Wireless Mouse Review




Best Wireless Gaming Mouse - I have been seeking a fully-featured wireless mouse for the past two weeks and have finally found my optimum choice in the Logitech M510 Wireless Mouse. This mouse is just large enough to be a comfortable fit for virtually any hand. The battery life is outstanding! The package says the batteries will last 2 years. I have been using it for gaming and normal computer

Seven Languages in Seven Weeks: Erlang, Day 2

After learning some basic Erlang syntax on Day 1, I take on the second Erlang chapter, which introduces some more interesting concepts.

Erlang, Day 2: Thoughts

I'm finding it very easy to dive into Erlang. After going through the Prolog and Scala chapters of this book, as well as making heavy use of Scala at work, the functional constructs used in Erlang feel natural. I've grown very fond of pattern matching in the last few months and have found it to be a very powerful tool for expressing complex concepts in a very concise and readable manner. Erlang's heavy reliance on pattern matching makes me happy.

However, the syntax does feel slightly clunky: I constantly forget to end lines with dots and separating clauses of control structures with semi-colons gets annoying. I suspect this is something you get used to. Moreover, the end result, at least in the dead-simple code snippets I've looked at so far, is pleasantly readable.

Erlang, Day 2: Problems

List lookup

Consider a list of keyword-value tuples, such as [{erlang, "a functional language"}, {ruby, "an OO language"}]. Write a function that accepts the list and a keyword and returns the associated value for the keyword.

My implementation:


Shopping list price

Consider a shopping list that looks like [{item, quantity, price}, ...]. Write a list comprehension that builds a list of items of the form [{item, total_price}, ...] where total_price is quantity times the price.

My implementation:

Sample usage:


Tic-tac-toe

Write a program that reads a tic-tac-toe board presented as a list or a tuple of size nine. Return the winner (x or o) if a winner has been determined, cat if there are no more possible moves, or no_winner if no player has won yet.

My implementation:

Sample usage:

My first tic-tac-toe solution was a bit more complex, using recursion to scan all rows, columns and diagonals. However, I found that for a 3x3 board, the simple pattern matching approach, while somewhat verbose, was much easier to read.

Seven Languages in Seven Weeks: Erlang, Day 1

After a long hiatus, I'm finally back to working my way through Seven Languages in Seven Weeks. After finishing up Scala, I'm now on the 5th language, Erlang, though it has taken me quite a bit longer than 5 weeks to get here.

Erlang, Day 1: Thoughts

The first Erlang chapter is just a gentle introduction to the language, so I haven't formed much of an impression of it yet. So far, it looks like a dynamically typed functional programming language with Prolog syntax and pattern matching. Of course, I mostly know of Erlang for its concurrency story, so I'm excited to experiment with that in later chapters.

Erlang, Day 1: Problems

Write a function that uses recursion to return the number of words in a string

Write a function that uses recursion to count to ten

Write a function that uses matching to selectively print "success" or "error: message" given input of the form {error, Message} or success

On to day 2

Check out Erlang, Day 2, for more functional programming goodness.

Gigabyte GM-ECO600 Long-Life Wireless Laser Mouse Review




Best Wireless Gaming Mouse - I bought this wireless mouse for my 13 yr old nephew. He does gaming on his laptop and really likes this mouse. He use the mouse everyday for anything from surfing the web to editing photos and vids and it is really good. The Gigabyte GM-ECO600 Long-Life Wireless Laser Mouse was great, fast tracking, and felt moderately nice in the hand. The dpi adjustments are