Sep 14, 2011

Expanding TextMate

TextMate is probably one of the most popular text editors for MacOS, and it is for a reason. TextMate is very expandable and it can handle many workflows - starting from writing books to coding complicated projects in various languages (e.g. python, c++, etc).

Recently I got exposed to a programming language called Scheme. It is a high-level and pretty powerful language, however it is not so popular. Due to that, TextMate, by default does not support it.

Here are the steps to get support for Scheme or many other programming languages in TextMate (requires git).

$ mkdir /Library/Application\ Support/TextMate/Bundles
$ cd /Library/Application\ Support/TextMate/Bundles
$ git clone git://github.com/textmate/scheme.tmbundle.git

Now all you have to do is restart TextMate and Scheme will appear as one of the supported languages. In the following link, there is a list of all other languages which can be downloaded for TextMate:

https://github.com/textmate/

Jun 7, 2011

Password Security

Since the introduction of the Internet in the last century, the concept of World Wide Web and its use has evolved drastically. It transformed from being a means of communication among scientific communities to being, literally, part of our lives. In this 21st century, almost everything we do depends on the Internet. We communicate, share, learn, teach, develop and entertain ourselves on the Internet. We do all of those activities using various services provided by companies ranging from Facebook, Twitter, Wikipedia to Banks and Government Agencies. Use of these services, even though they are very useful and sometimes even life dependent, can however cause many security concerns.

Security, as Wikipedia puts it, “is a degree of protection against danger, damage, loss, and criminal activity.” In other words, it is a method by which we protect something, and in the context of the Internet it is a method by which we protect information. Sometimes information can be public (for instance a tweet is meant to be public), however sometimes it is expected to be kept private (social security number or a bank account number). This is a big issue in computers and even a bigger issue in the cloud (Internet).

One way and is a most common way to deal with the issue of security is to use a username/password authentication schema which has been adopted by majority of the web. The idea is that in order for some user to gain access to some private information, the user has to provide a username which will allow a web site to identify who is trying to authenticate, and a supposedly secret password in order for the web site to make sure that the user trying to login is in fact allowed to gain access to the information in question. This method of verification of the entity trying to login is usually sufficient except for majority of the web users, it’s not.

Jan 12, 2011

Computing π

Welcome to my blog

What a better way to start a blog than my posting an entry about computation of wonderful, Greek originated mathematical constant π. This beautiful number is literally used everywhere. It's obviously used in geometry, trigonometry, as well as in linear algebra, calculus, etc. Without this number many of the things we know and use would not be possible.

For instance, if you ever played a video game or ever used a GUI based operating system such as Windows, MaxOS, you have experienced the power of sin() and cos(). In order to rotate objects on the screen, a rotational matrix has to be used which is basically a combination of sin() and cos() functions. Now, if it wasn't for π, computing these useful functions would be impossible, not to mention, they would not exist.

Here is another instance where π is used. Many realistic differential equations we can encounter end up having complex solutions which basically solutions which involve a use of an imaginary number i = sqrt(-1). When these solution are solved into non-complex form, they end up being a combination of both sin() and cos(). One specific problem which involved the use of these complex differential equations is the modeling of an airplane wing. They are used in order to optimize the airflow dynamic of the wing. If it wasn't for these equations, optimizing shape for an airplane wing would still be done in an wind tunnel. It's not that the wind tunnel is not cool, but mathematically it could be classified as a trial and error method for optimizing structures, not something scientific community likes to do.

So, the conclusion is that without π solving many of every day problems would not be possible. For more information regarding the use of π in mathematics and science in general, you can visit here.