I recently created a video course on creating a dApp on top of the Ethereum framework. Along with the detailed videos, I prepared step-by-step notes for the course. So, I decided to share them here for those who wish to learn from text-based material instead.
I wanted to share a case study on how open source can help solve mundane, every day, personal, real world issues.
I’ve moved once again! This time, I’m taking the show to Github Pages. In the past, I’ve advised students to stay away from Github Pages and just stick to Wordpress because I feel doing this whole static site generation business reduces the chances of actual posting! However, since I don’t post much anyway now and mostly use the site for course redirection, I decided to give it a try.
So, people who are interested in Computer Science have been asking me whether they should pick a Computer Science specialisation or a Software Engineering one.
As you guys might know, I’m not so fond of C++. The C language is great but the ++ additions are just not my thing. Here’s an example of why: If you want to split a comma separated string into integers in Python, it’s as simple as:
For the past year or so, we’ve been working towards creating a collaborative environment that can help undergrad students achieve their true potential in CS through augmented learning.
Just started the introductory course on Programming Fundamentals here in FAST NUCES. To all the new students who are visiting here, welcome! Make yourself comfortable.
I’ve just finished creating an intermediate level Python course. If you have had a course on basic Python and you want to take your skills to the next level, you can take this course to learn concepts that differentiate an expert from a beginner level programmer. We will cover concepts like logging, testing, multithreading, asynchronous programming (async/await), functional programming and regular expressions.
I’m scheduled to give a 1.5 hour talk on blockchains at IMSciences, Peshawar. It’s free so if you can make it, you’re welcome to attend.
I have just finished uploading a new video course about Hyperledger Fabric and Composer - First Practical Blockchain.
I have a new video course that helps aspiring computer scientists excel in almost any area that they decide to pursue by teaching them about the Linux command line – one of the best investments in time anyone working with computers can make.
I’ve just finished creating a new video course on Udemy about Practical Deep Learning with Keras and Python. It’s aimed at two types of people:
Update: If you are interested in getting a running start to machine learning and deep learning, I have created a course that I’m offering to my dedicated readers for just $9.99. Practical Deep Learning with Keras and Python .
Update: If you are interested in getting a running start to machine learning and deep learning, I have created a course that I’m offering to my dedicated readers for just $9.99. Practical Deep Learning with Keras and Python.
So, I’ve been teaching CS101 - Introduction to Computing this semester (Fall 2017). We picked Python as the language. I’ve compiled the videos and all the lecture notebooks. These are being made available in the hopes that they can be useful for someone. Here’s how to get started with these.
Protein function prediction is taking information about a protein (such as its amino acid sequence, 2D and 3D structure etc.) and trying to predict which functions it will exhibit. This has implications in several areas of bioinformatics and affects how drugs are created and diseases are studied. This is typically an intensive task requiring inputs from biologists and computer experts alike and annotating newly found proteins requires empirical as well as computational results.
Update: If you are interested in getting a running start to machine learning and deep learning, I have created a course that I’m offering to my dedicated readers for just $9.99. Practical Deep Learning with Keras and Python.
I started with Machine Learning a while back and had a slightly hard time getting help from the local community. The reason was mostly because the Machine Learning community in general is way behind the state-of-the-art in industry and research. This is true for almost all fields nowadays but with Machine Learning, the issues are more pronounced due to the recent fast-paced developments in the industry.
I’ve just started with another Coursera course – this one about learning in general. The course is called Learning How to Learn: Powerful mental tools to help you master tough subjects. It’s actually a fairly easy going course, as far as I can see. The assignments and quizzes are fairly straight forward for the most part but the important bit is that the instructors share their life experiences about learning. I hope to be able to get through this course – I have enough ambition that I’ve even signed up for the paid “Signature Track” version of the course.
Here’s a mini howto on backing up files on a remote machine using
rsync
. It shows the progress while it does its thing and updates any remote files while keeping files on the remote end that were deleted from your local folder.I am a teacher and researcher working in the field of computer science. Find out more about me on the About page or see my research output on the Publications page.
So, Admob was acquired a while ago by Google and it was recently announced that the publisher reports by Admob would no longer be available through the old APIs. Instead, they now have to be retrieved through the AdSense API – which is based on OAuth 2.0 and thus a real pain for those just getting started.
Well, that was short-lived. I moved away from Wordpress – only to come back after around 6 months and one post. Seems like Octopress is too much of a hassle for someone as unstable as me. Maybe another time when I’m more focused.
We’re going to use the the Hadoop tarball we compiled earlier to run a pseudo-cluster. That means we will run a one-node cluster on a single machine. If you haven’t already read the tutorial on building the tarball, please head over and do that first.
I wrote a tutorial on getting started with Hadoop back in the day (around mid 2010). Turns out that the distro has moved on quite a bit with the latest versions. The tutorial is unlikely to work. I tried setting up Hadoop on a single-node "cluster" using Michael Knoll's excellent tutorial but that too was out of date. And of course, the official documentation on Hadoop's site is lame.
Having struggled for two days, I finally got the steps smoothed out and this is an effort to document it for future use.
I'm going to try to break this up in a couple of posts so that it's easier to read. This first part is going to be discussing the setup of a workable environment and then building Hadoop from the source. The reason for building from source is that if you have a 64-bit OS, the Hadoop tarball will not include 'native libraries' for your system and you will get weird errors such as this one:
WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
It's just a warning but it messes up with some startup scripts enough to make things unstable. So, we build from the source. First, though, let's setup an environment that we can re-use if we mess things up. If you really don't want a VM and instead want to go with a physical machine, just go ahead and install Ubuntu 12.04.3 LTS Server on a physical machine and skip the next section. Just name the main user 'hadoop' and keep the password as 'hadoop' as well so that you can follow along the rest of the tutorial with ease.
Environment Setup
My main machine is a Ubuntu 13.10 64-bit system but that is not important because we are going to set up a Virtual Box machine. That has the major advantage of easy backup if we mess things up.
So, download virtualbox in any way you want. For Ubuntu, that would be simply:
sudo aptitude install virtualbox -y
Afterwards, it's best to add a separate host-only adapter to virtualbox and add a network interface to your machine.
- For the first step, start virtualbox, click on 'File -> Preferences -> Network' and simply click on the 'Add Host-Only Network' button.
- Then, create a 64-bit Ubuntu machine (I kept the default settings of 8GB hard drive and 1GB RAM). Once that is done, right-click on the machine (I named my ub64_1) and in the network settings, add another interface with Host-Only Network setting. That way, you will have internet access through NAT and host-connectivity through this second interface.
Alright, with that done, we can start the virtual machine, attach an ISO file to the new machine and install Ubuntu 12.04.3 64-bit Server. Defaults work fine -- just set the main user's username as 'hadoop' with 'hadoop' as the password. Reboot the machine and make sure you can ping the host machine and the network.
I had a problem with the machine when it started -- eth1 was missing and thus host-guest connectivity was gone. If that is the case, edit
/etc/networking/interfaces
and add eth1 below eth0 with auto settings. That and a reboot should fix the connectivity. Btw, you can start the VM in headless mode to save some resource usingVBoxHeadless -startvm hdub_64_1
Downloading and Building Hadoop
Alright, now that we have a clean working machine, let's get the build essentials for Hadoop first. For that, you need to use the following command:
[sourcecode lang="bash"]
sudo apt-get install -y
gcc g++ make maven cmake zlib zlib1g-dev libcurl4-openssl-dev
[/sourcecode]You will notice that Hadoop's official documentation mentions protoc but we aren't installing that. The reason is that the protoc version in Ubuntu's repos is older than what is needed. So, we will be building protoc from source as well.
To build protobuf, we download the source and bulid it from source. The following commands should work fine:
[sourcecode lang="bash"]
curl -# -O https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz
gunzip protobuf-2.5.0.tar.gz
tar -xvf protobuf-2.5.0.tar
cd protobuf-2.5.0
./configure --prefix=/usr
make
make install
protoc --version
[/sourcecode]The last command should tell you that you have protoc version 2.5.0 installed. Of couse, we also need the Java bindings of protobuf for Hadoop to use. For that, do the following:
[sourcecode lang="bash"]
cd java
mvn install
mvn package
[/sourcecode]That's it for protobuf. Now, to finally get building Hadoop itself. Download the source for 2.2.0 (current stable version) from the Hadoop releases page. Pick a mirror and download the latest source. I downloaded this one for example, http://www.eu.apache.org/dist/hadoop/common/stable/hadoop-2.2.0-src.tar.gz.
[sourcecode lang="bash"]
wget http://www.eu.apache.org/dist/hadoop/common/stable/hadoop-2.2.0-src.tar.gz
tar zxf hadoop-2.2.0-src.tar.gz
[/sourcecode]Now, there is a problem with the source. One of the maven pom files is incorrect. To fix that, apply the following patch:
[sourcecode lang="diff"]
--- hadoop/common/trunk/hadoop-common-project/hadoop-auth/pom.xml 2013/11/18 22:09:24 1543189
+++ hadoop/common/trunk/hadoop-common-project/hadoop-auth/pom.xml 2013/11/18 22:11:11 1543190
@@ -54,6 +54,11 @@
</dependency>
<dependency>
<groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
<artifactId>jetty</artifactId>
<scope>test</scope>
</dependency>
[/sourcecode]After that, simply build all the projects using the following command:
[sourcecode lang="bash"]
mvn clean install -DskipTests
[/sourcecode]You should get an output ending with something like this:
[sourcecode lang="bash"]
...
[INFO] Apache Hadoop Tools ............................... SUCCESS [0.376s]
[INFO] Apache Hadoop Distribution ........................ SUCCESS [1.613s]
[INFO] Apache Hadoop Client .............................. SUCCESS [0.925s]
[INFO] Apache Hadoop Mini-Cluster ........................ SUCCESS [0.623s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10:33.592s
[INFO] Finished at: Wed Jan 22 07:04:11 PKT 2014
[INFO] Final Memory: 77M/237M
[INFO] ------------------------------------------------------------------------ [/sourcecode]I return with a minor post after another long break. This time, it’s about writing better English. Now, this isn’t humblebragging but I cannot be considered excellent at English writing – at least not by native standards. English is not my first language and I haven’t had much formal English education. I have, however, read a lot. Even if my English is not good, I can still point out some tips shared by experts.
So you’ve started working with Django and you love the admin interface that you get for free with your models. You deploy half of your app with the admin interface and are about to release when you figure out that anyone who can modify a model can do anything with it. There is no concept of “ownership” of records!
I’ve been teaching “Applied Algorithms and Programming Techniques” and we just reached the topic of AVL Trees. Having taught half of the AVL tree concept, I decided to code it in python – my newest adventure. Bear in mind that I have never actually coded an AVL tree before and I’m not particularly comfortable with python. I thought it would be a good idea to experiment with both of them at the same time. So, I started up my python IDE (that’s Aptana Studio, btw) and started coding.
Back when I first became interested in science, one of the first areas I was interested in was Biology – specifically human evolution because of the hype it gets. The whole religion versus science becomes very pronounced in the creation-or-evolution debate. I read through a lot of material and was able to understand natural selection quite easily. It’s not all that complicated as some would like to suggest. It’s simply this: whoever is the better in a particular situation survives. It’s easy to understand once you realize that that’s a tautology. Whoever survives is the “fittest” and the fittest survives. So, no problems there but there was always something that didn’t quite fit. I could never quite digest the “theory” that micro-evolution (birds changing bone shape etc.) could lead to macro evolution (going from single-strand RNA to fish).
This is a no-nonsense guide to the installation of OpenERP – the popular open source and customizable ERP solution – aimed at the complete newbie. Of course, there has to just a little bit of “nonsense” to get you started. So, here it is: (a) You need to have PostgreSQL installed as the database backend for OpenERP. (b) OpenERP is written in python so you’ll need some packages for that part. (c) There is a server and a client. The server is important – client can be both a desktop client or a web client. (d) We’ll cover all of this except the web client. You don’t need that to get started. (e) We’re using OpenERP on Ubuntu 11.10 but an older version should also work.
A friend and I have been working on Java Agent DEvelopment Framework (JADE) for a while now. The idea is to enhance security mechanisms in the open source agent-deployment platform. The first step we decided to address was the actual mobility of an agent from one platform (in the sense of a dedicated machine running the JADE middleware) to another one. Turned out that it was much harder than one would imagine -- especially given the fact that these agents are supposed to be mobile. Anyway, after around two months of part-time efforts, we got the agent working. Since the whole ordeal involved a lot of missing documentation and bad support, I decided to document the process through this tutorial. So, here it is. Read on to see how you can create an agent on one platform, migrate it to another platform, have it do some computation there and come back to the source.
First, you're going to need two machines running Ubuntu. (We used Ubuntu 11.10 oneric for this.) If you only have one machine, you can install VirtualBox, setup a Ubuntu instance in a VM and connect it to the host through a virtual interface. I prefer using two adapters, first one set to a NAT setting and another one set to Host-only setting. This way, I get Internet connectivity in the guest as well as host-to-guest simple addressing.
We're going to use JADE 3.6 along with the JADE Inter-platform Mobility Service (JIPMS) 1.2 for our needs. Download JADE and JIPMS. I used jade-binary package and extracted it in /home/documents/jade. I also extracted the JIPMS and moved the file migration.jar from its lib folder to the lib folder of jade binary. This makes it easier for us to change the classpath later on. We'll need these files on both machines.
Now we need to setup the machines. Here are the details of the setup on each machine:
Host:
hostname: slave1
IP: 192.168.56.1 (set by VirtualBox automatically)You can get the IP addresses of each machine through the ifconfig command. Edit /etc/hosts to insert the other machine's address. My hosts file on slave1 looks like this:
[sourcecode language="bash"]
# 127.0.0.1 localhost
127.0.0.1 slave1
192.168.56.101 slave2
[/sourcecode]Now, we can run jade using the following command:
[sourcecode language="bash"]
java -cp lib/jade.jar:lib/migration.jar:lib/iiop.jar:
lib/jadeTools.jar:lib/http.jar:
lib/commons-codec/commons-codec-1.3.jar
jade.Boot
-gui
-platform-id slave1
-host slave1
-services jade.core.mobility.AgentMobilityService;
jade.core.migration.InterPlatformMobilityService
-accept-foreign-agents true
[/sourcecode]You will need to use a little common sense about the line breaks and spaces here. I've formatted the command for highest readability. (Note the escaped ';' in the services param and the use of full colon instead of the semi-colon in the classpath. This is only required on *nix platforms.) Three switches are important here: platform-id, host and services. First two are self-explanatory. Third tells the IPMS to start the services that take care of the agent migration. We also need to enable the acceptance of foreign agents but I'm sure you already knew that from all the mailing list searches.
Guest:
hostname: slave2
IP: 192.168.56.101 (set by VirtualBox automatically)The hosts file looks like this:
[sourcecode language="bash"]
# 127.0.0.1 localhost
127.0.0.1 slave2
192.168.56.1 slave1
[/sourcecode]Start jade on slave2 using the following command:
[sourcecode language="bash"]
java -cp lib/jade.jar:lib/migration.jar:lib/iiop.jar:
lib/jadeTools.jar:lib/http.jar:
lib/commons-codec/commons-codec-1.3.jar
jade.Boot
-gui
-platform-id slave2
-host slave2
-services jade.core.mobility.AgentMobilityService;
jade.core.migration.InterPlatformMobilityService
-accept-foreign-agents true
[/sourcecode]The Agent:
Now, we turn to the actual agent code that does the migration. For this, we can setup eclipse and code from within that. The code for the agent is fairly straight-forward:
[sourcecode language="java"]
package org.csrdu.mobility;import jade.core.AID;
import jade.core.Agent;
import jade.core.PlatformID;
import jade.core.behaviours.TickerBehaviour;@SuppressWarnings("serial")
public class MobileAgent extends Agent {@Override
protected void setup() {
super.setup();
addBehaviour(new MyTickerBehaviour(this, 1000));System.out.println("Hello World. I am an agent!");
System.out.println("My LocalName: " + getAID().getLocalName());
System.out.println("My Name: " + getAID().getName());
System.out.println("My Address: " + getAID().getAddressesArray()[0]);
}private class MyTickerBehaviour extends TickerBehaviour {
Agent agent;
// long interval;
int counter;public MyTickerBehaviour(Agent agent, long interval) {
super(agent, interval);
this.agent = agent;
// this.interval = interval;
}@Override
protected void onTick() {
if (counter == 3) {
// move out
AID remoteAMS = new AID("ams@slave2", AID.ISGUID);
remoteAMS.addAddresses("http://slave2:7778/acc");
PlatformID destination = new PlatformID(remoteAMS);
agent.doMove(destination);
}
if (counter == 10) {
// move back
AID remoteAMS = new AID("ams@slave1", AID.ISGUID);
remoteAMS.addAddresses("http://slave1:7778/acc");
PlatformID destination = new PlatformID(remoteAMS);
agent.doMove(destination);
}
if (counter < 15)
System.out.println(counter++);
else
agent.doDelete();
}}
}
[/sourcecode]For the sake of completion, here's the arguments that you have to pass when running the agent code from within eclipse.
[sourcecode]
-container -agents mob:org.csrdu.mobility.MobileAgent
-services jade.core.mobility.AgentMobilityService;jade.core.migration.InterPlatformMobilityService
[/sourcecode]Also, add all the jade and mobility jars to the build path of the project. I'm not sure which ones are needed here so you will have to figure that out on your own.
Caveats:
- If you get this error:
Destination slave2:1099/JADE does not exist or does not support mobility
, it most probably means that you (a) you don't have IPMS running, (b) you didn't put the -services switch properly (c) there's a firewall blocking your port 7778 or (d) your hostnames are messed up. In any case, the whole instructions above should work for you. - You will most probably need to change your /etc/hosts file and comment out the line that says '127.0.0.1 localhost'. It causes JADE to start the ams@slaveN service as http://localhost:7778/acc instead of http://slaveN:7778/acc and that means a lot of missed ACL messages and a lot of headaches. You usually get the dreaded
getContainerID() failed to find agent ams@slave1
error because of this. Do this for both the host and the guest. Make sure your JADE GUI looks like the following:
- Finally, if you need detailed logging, you can create the logging config file by the name of logging.properties given below and pass the
-Djava.util.logging.config.file=logging.properties
parameter when starting JADE. This will give much finer-grained logs. This is standard log4j syntax.
[sourcecode]
handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
.level=INFO
jade.domain.mobility.level=ALL# --- ConsoleHandler ---
java.util.logging.ConsoleHandler.level=ALL
java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter# --- FileHandler --- java.util.logging.FileHandler.level=ALL
- If you get this error:
Update: If you are interested in getting a concise intro to LaTeX along with my tips on best practices, checkout my course (for just $12.99) on Udemy here.
I’ve started putting together a couple of screencasts for those who want to start working with LaTeX. These are aimed at the extreme newbie who wants to learn the basics and get up to speed with the typesetting tool. I’ll be updating this post as I put more videos online inshallah. For now, see the videos below or on Youtube. For best results, view in HD at full screen.
Below you can find the individual scores for assignments and quizzes set in CS314 Computer Networks Lab for Fall 2011. Note that the course instructor will decide at the end of the semester how these get incorporated in the final assessment.
Update Sep 08, 2011: Lectures are now available on the Lecture Server. Please get the updates there.
Amazon Simple Email Service (SES) is a Email Marketer’s dream come true. It allows you to send bulk emails to customers without fear of having your email land in their spam/junk folder – unless of course you’re sending spam and a huge majority of your “customers” start marking it as such.
Varnish is an extremely easy to configure server cache software that can help you counter the ‘slashdot effect’ – high traffic over a small period of time. The way Varnish does this is by sitting between the client and the webserver and providing cached results to the client so that the server doesn’t have to process every page. It’s better than memcache etc because the request never gets to the webserver. You can avoid one of the bottlenecks this way. In this tutorial, we’ll cover how to setup Varnish on a VPS (or dedicated server) where you have root access and are running your site using cPanel/WHM. It also applies to situations where you don’t have cPanel/WHM. You can just skip the cPanel portion if that’s the case. So, let’s get started.
As the regular readers might know, I’m a big fan and regular user of the LaTeX typsetting system. Keeping to the tradition of occasionally posting a LaTeX tutorial on the blog, here’s one that will be useful to all those that are trying to get up and running with XeTeX – the unicode support adding big brother to the TeX typesetting system. XeTeX basically allows you to use all the Opentype (and other) fonts installed on your system – and it adds unicode support. That means you can use the latest Adobe fonts you’ve got as well as all the Arabic, Urdu, Chinese and Japanese fonts and typeset them as beautifully as you would any Latin script in LaTeX. It’s a hassle to set it up though and you wouldn’t find many tutorials or how-tos on the Internet.
I just came across this great feature in Safari (having downloaded it for Windows 7) that’s called ‘Safari Reader’. It allows you to read articles on any webpage in an extremely readable, uncluttered pane.
Update: If you are interested in getting a running start to machine learning and deep learning, I have created a course that I’m offering to my dedicated readers for just $9.99. Access it here on Udemy. If you are only here for Matlab, continue reading =]
To install ProFTPD with MySQL-based authentication and SFTP support, you need to download the latest version of the source code and build it with customized options. But first, some prerequisites. (These instructions are for ubuntu but can easily be modified for CentOS).
So you’ve setup a2billing and have everything working out, all the DIDs are forwarded to a2billing and all the call plans are set. All you’re missing is a voicemail system. Wait no more. Here’s how to enable voicemail for a2billing users.
Before you start reading this tutorial, let me remind you once again who the intended audience of this post is – newbie system administrators. If you’re an experienced admin and are going to laugh at my naivete for writing such basic stuff, please go away – or provide some more ‘advanced’ tips in the comments below so that I know better for the future.
Jira is an extremely well-known issue tracking system and is used widely for project management in a wide array of fields. It has quite a detailed documentation but it’s in the form of a wiki and as we all know, wikis are the worst way of creating software documentation. Anyway, in order to install Jira with MySQL, you will have to click and click and click. This tutorial aims to ease this issue by providing step-by-step instructions on how to install jira and enable it to connect with MySQL for storage. So let’s begin.
For those of you who have used Amazon AWS (EC2 specifically) for more than just testing would know that the / partition in an AMI does not go beyond 10GB. So, if you need more space you need to mount more volumes. This is a beginner’s guide to do just that.
Ok, so this might sound childish to the more experienced admins and programmers but I’ve always found the need to search and replace a string in multiple files. For example, if I have to work with an inexperienced programmer’s code, I might have to change the name of the database in a couple of dozen places. If you are in such a place, you might want to try the following script:
I recently had to deploy vTiger CRM 5 on a machine running PHP 5.2. Turned out that vTiger does not like PHP 5.2 because of some differences between PHP 5.0 and 5.2. As soon as you start the install script, you get the following error:
Over the past few weeks, I have been working with the popular telephony software asterisk and all the stack that stands on top of it. I have (in coordination with a friend) setup asterisk, FreePBX, a2billing, fax for asterisk and vicidial on several production servers. Combined, these provide a complete telephony solution for a wide range of commercial organizations. As a side note, I might be writing tutorials about some of these things in the future.
In this video, we talk about Auto Scale feature of the Elastic Compute Cloud (EC2). Auto Scale allows AWS to automatically start new instances of AMIs as more and more load is put on the instance. You can define triggers (policies) that define what the low and high limits are. Whenever these limits are breached, instances can be started or stopped depending on the policies. In this video, we start from scratch and setup the Auto Scale feature.
The second in the series of Amazon Web Service tutorial videos. Here we describe how to create a keypair for shell access to an Amazon Machine Image instance, how to do basic firewall configuration to enable remote login and finally start and connect to the a basic Amazon Linux AMI.
The first in a series of videos by CSRDU about Amazon Web Services (AWS). Here, we talk about the different web services and technologies offered by AWS. It’s supposed to make sense of the different services that AWS offers and whether you need them or not. (Click to view larger version on YouTube)
A friend of mine asked me the other day how ‘pretty printed’ source code can be inserted into wordpress posts. Here’s how:
Hadoop is Apache’s implementation of the brand-spanking new programming model called MapReduce, along with some other stuff such as Hadoop Distributed Filesystem (HDFS). It can be used to parallelize (or distribute) and thus massively speedup certain kinds of data processing. This tutorial will talk about installing, configuring and running the Hadoop framework on a single node. In a future tutorial, we might create a project that actually uses Hadoop for problem solving through multiple clustered nodes. Here, we start by looking at the setup of a single node.
I started using Arabic (and Urdu) scripts quite a while ago. I came across the whole non-latin script problem when I was developing a software for a government agency related to land revenue. In the development of this software, I found myself learning about alternative keyboards and Asian language support in Windows. I also found out about the excellent research going on in FAST-NU Islamabad related to Urdu language support for computers. As an aside, I encourage all readers to go read about their work on CRULP and see the Naskh, Web Naskh and Nastaliq fonts they’ve developed and released free of charge. They’ve done a truly great job and none of my comments in the rest of the post should be taken as an offense to them or their work.
This post will provide a way for students of HCI (Fall 07 - FAST-NU) to keep track of their results throughout the semester. Quiz/assignment scores and exam grades will be available through the spreadsheet embedded below. It will be your responsibility to bookmark these pages and visit the pages after exams to see your official score. If you have any problems/concerns, let me know through email. Commenting on this post is enabled but should only be used in case you have suggestions for improvement of this system. Do not post anything about your scores. I will not answer any such queries here.
I installed Ubuntu two days ago and was surprisingly pleased by the responsiveness and general outlook of the OS. I spent a day getting everything just the way I like. It booted up really fast and I was very pleased with the improvements in the user interface that have come about since the last time I used it. Ubuntu has surely come a long way from 8.04 to 10.04.1.
I remember posting on my blogger account that I was moving to Wordpress.com. It’s that time again. I’ve moved all the contents of this blog to my new home: http://www.csrdu.org/nauman
Update: If you are interested in getting a running start to machine learning and deep learning, I have created a course that I'm offering to my dedicated readers for just $9.99. Access it here on Udemy. If you are only here for Matlab, continue reading =]
I just finished writing my first machine learning algorithm in Matlab. The algorithm is based on gradient descent search for estimating parameters of linear regression (but can be easily extended to quadratic or even higher-dimensional polynomials). It's fairly easy if you know the theory behind the model. So, first a very brief theory portion. This isn't a tutorial on statistics. Go read a book if you don't know about regression.
Just to recall: Regression comes in when you want to estimate a response variable ($latex y$) given explanatory variables ($latex x_i$). The goal for linear regression is to come up with values for parameters ($latex \theta_i$) such that you get a 'best possible fit' for each jth instance in the dataset of m instances:
$latex y^j = \sum_{i=1}^m{\theta_i \times x_i^j}$
In matrix notation, that comes simply to:
$latex Y = \theta^T X$
(For ease, we assume that $latex x_1$ is a vector of all 1s thus making $latex \theta_1$ the y-intercept).
The idea of gradient descent is to come up with the best (locally) values of $latex \theta$. It does this by repeatedly updating the value of $latex \theta$ using the formula:
$latex \theta_i = \theta_i - \alpha * \sum_{j=1}^m{(\theta^T X^j - Y^j) X_i^j}$
If you have no idea what this is or if you want to know this in-depth, read till the end.
Here's the Matlab code for this whole procedure I wrote at first. Note the use of W for $latex \theta$:
[sourcecode language="matlab"]
% Gradient descent algo for linear regression
% author: Nauman (recluze@gmail.com)%set the data
X=[1 1 1 1 1 1 1; 22 49 80 26 40 54 91];
Y=[20 24 42 22 23 26 55];
hold on;
plot(X(2,:),Y, 'x');% set the actual values of W
W = [5.775 0.474]';
YAct = (W' * X);% GRADIENT DESCENT
W = zeros(2,1); % initialize W to all zeros
m = size(X,2); % number of instances
n = size(W,1); % number of parameters
alpha = 0.000025; % gradient descent step sizedisp('Starting Weights:');
W% 1) do the loop for W estimation using gradient descent ------------
for iter = 1 : 20 % let's just do 5 iterations for now ... not til convergence
% for each iteration
for i = 1 : n % looping for each parameter W(i)
% find the derivative of J(W) for all instances
sum_j = 0;
for j = 1 : m
hW_j = 0;
for inner_i = 1 : n
hW_j = hW_j + W(inner_i) * X(inner_i,j);
end
sum_j = sum_j + ( (hW_j - Y(j)) * X(i,j) ) ;
end
% calculate new value of W(i)
W(i) = W(i) - alpha * sum_j;
end
% plot the thingy
newY = (W' * X);
gColor = 0.05 * iter;
plot(X(2,:),newY, 'Color', [0 gColor 0]);% end 1) ------------ end % output the final weights disp ('Final calculated weights'); W % output actual weights from formula in Red W = [5.775 0.474]' plot(X(2,:),YAct, 'Color',[1 0 0]); % finish off hold off; [/sourcecode]
I recently had to write a Linux Security Module (LSM) for one of my research projects and I was surprised to find that there are few tutorials out there and most of them don’t work because of the discrepencies in kernel versions. They’re talking about 2.000.x kernel versions! The only good tutorial I came across was the one on Linux Journal but it assumed some background knowledge (which I didn’t have). So, I had to struggle for a day to figure out how to go about writing the LSM. Hence, this tutorial.
I’ve had enough. Some of my friends initiated the boycott a few months back but I wasn’t convinced. I was mistaken. Facebook has, time and again, refused to take action against hate speech and hate groups that operate within the platform. I came up with many excuses to keep using the platform and fabricated many arguments in its favour. Fortunately, I gave it time and now realize that facebook is to blame.
It’s been four days since I started working with eclipse plugins and I finally have my first useful plugin. It’s useful for my research purposes and hopefully for a small audience interested in my work. It might also be useful for those trying to learn how to write eclipse plugins because I’ll soon be writing a tutorial on how I put this thing together from scratch (inshallah).
I have tried, on multiple occasions, to write an eclipse plugin. I always gave up in the middle of the process though, what with the different versions of eclipse floating around and the discrepancies between the tutorials and the version I was using. I finally decided to sit down and go through a simple ‘hello world’ plugin and write a tutorial in the process to guide those that are using the latest eclipse. This is a tutorial for eclipse 3.5 (galileo) and is a no BS tutorial with little or no explanation. That’s because I believe in code first, think later approach when learning new technologies. So, download eclipse SDK version (not the Java or the C/C++ version) and read on.
Zaid Hamid is cornered. He has nothing to say and nothing to clear his name with. As one of my friends put it, “there is no need to expose Zaid Hamid”. He is clearly deviated but some people still don’t get it. So, I thought I should help these people figure out what the question under discussion really is around here. It’s not about Zaid’s ideas about khilafat. It’s not about how good his speeches are. It’s not whether he works for the CIA or against it. It has nothing to do with any of it. The question that we are concerned with here is only of Yousuf Kazzab. If Zaid Hamid defends a kazzab, then:
For those who can’t bother to read the whole thing, here’s the short version: Zaid (Zaman) Hamid is a supporter of Yousuf Ali Kazzab who claimed prophethood for himself and was convicted by a court of Pakistan on those counts. Scholars of almost all sects agree that he was a kazzab and got what he deserved. Zaid Hamid waited a long time before answering any queries regarding this issue and when he finally had to come out, he did so by defending the kazzab. So, he is a follower of the kazzab and in no way should be followed or supported by muslims. Read on for the full version.
After struggling with XEN’s source for around two weeks, I’ve finally managed to get it working on a Ubuntu 8.04. It was fairly straight forward with a few bits and pieces of trouble. That is mainly due to the problems of incompatibility between different versions of the hypervisor and
dom0
kernels.I started teaching at IMSciences around a month ago. Today, I got the news that I’m being kicked out, mid-semester. I’m not surprised because I knew what was going on behind my back. I’m not mad. I’m not angry. I’m not even sad. I am a little bit disgusted though because in the past two years, I have given IMSciences more than 15 publications. I’ve written two books. I’ve helped bring in two projects with a combined funding of over 25 million. I’ve played my part in creating jobs for around twenty people. I even contributed in starting a PhD programme. After all that, they didn’t even have the decency to come up with a better excuse than, “some of your students had some objections on your teaching style”. That is obviously an offense which mandates termination without even a show-of-cause notice.
If you’ve ever had trouble installing Ubuntu because you couldn’t use a CD (because of a bad CD, a thoroughly malicious drive or, as in my case, a small-form CD stuck in your slot-load mechanism), you might want to read this. This mini-tutorial (slash how-to) is going to show you a clean and concise, no-BS mechanism for installing Ubuntu 8.04 Hardy Heron without the need for a CD or a working Linux installation. I didn’t discover this method. Just came across it somewhere and can’t find the link in Google. So, here it goes. (I’m assuming your USB is F: drive)
The result sheet (which will be updated after marking of each test/quiz) for BCS 5 at IMSciences can be found here. Let me know if you find any discrepancy.
I arrived back last week after attending the 16th Conference on Computer Communications and Security (CCS09) and Fourth Annual Workshop on Scalable Trusted Computing (STC09) in Chicago, USA. The conference was really good and provided an opportunity that inspired very promising ideas. Hope to get some of them prepared for the future conferences. Take a look at my publications page for details on the paper in STC. You can also take a look at the JSR321 project (the target of this paper) here.
I recently went to Naran in Kaghan Valley of NWFP (Pakistan). The place is amazing and I’d just bought a new SLR camera. So, my friends and I shot quite a few pictures of the place. I’ve uploaded them in many places but this being my primary blog, I’ll be putting thumbnails here along with links to the full versions. Click on the thumbnails for full versions and details.
Update: If you are interested in getting a running start to machine learning and deep learning, I have created a course that I’m offering to my dedicated readers for just $9.99. Access it here on Udemy. If you are only here for Matlab, continue reading =]
This tutorial is about flashing your Android Developer Phone 1 with your own custom build. It will provide a concise description of steps involved along with a special portion on how to port Google’s apps on your custom build. I found that particularly troublesome with little help on the Internet. So, that will be a bonus :)
We received our Google Android Dev Phone 1 yesterday and immediately ran into trouble. We don’t have a supported carrier here and we couldn’t get our own carriers to work with Android because we didn’t have the APN information. Android’s distro that comes bundled into the Dev Phone won’t let you in without an APN though. You get a “SIM not found” message and you can’t do anything other than dial an emergency number. So, after searching for a while, I found some useful tips for getting around the problem.
StudyBlue offers a social networking approach to studying. You can create classes, add professors, join networks and share documents and class notes not only with your classmates but also with those from other colleges. Like all social networks, it requires that you bring your friends over or it wouldn’t be very helpful. However, it allows you to read the public notes of other members of the site and that might serve as a very useful feature even when you don’t have many of your friends joining the site.
Our second research and development project has been approved by the National ICTR&D Fund, Pakistan. ICTR&D is a highly reputable funding agency and funds only state-of-the-art projects in the field of information and communication technologies. We at SERG have become the first group in NWFP to have two projects approved by ICTR&D. This one brings 14.7 million to SERG. (Not that we can use it willy-nilly but still.)
This is a more of a brainstorm than an idea and I have no idea if this already exists. But here’s the thought anyway.
HTC (the guys who built the first Android phone for T-Mobile) have released a new Android-based smartphone called Hero. It’s an amazing piece of technology and looks really cute. We’ll be trying to get our hands on this one but only if it’s not SIM-locked. Not likely, since HTC is a manufacturer, not a carrier. It runs on a customized Android OS. Looks like HTC guys put a lot of effort into the UI of the device. Not only is it multi-touch, it also looks like the next gen of UIs for smartphones. Here are the specs:
I’ve been an ardent fan and promoter of all social networking sites for a long time now. I’ve brought many people to twitter and I’ve even setup my own local laconi.ca server. However, in light of recent news surrounding twitter, I feel it necessary to inform the people I know about the hazards of using twitter without care. Here’s why:
Google is aiming at killing email altogether!
I gave a talk today on the gap between industry and academia and what the students can do to bridge that gap. You can take a look at the presentation file below. Topic of the presentation was “Bridging the Gap between Industry and Academia: Perspective and Rants” and was presented in City University.
For those who are interested in the activities of SERG but can’t come over to the end of the world (Phase 7 in Hayatabad), here’s a resource that you might benefit from. Video lectures of workshops conducted by SERG members are being uploaded online on different services. These will invariably be free and you can view them online if you have a reasonable internet connection. See the list here.
We’ve completed our submission for ACM Conference on Computers and Communications Security (CCS2009). Like SACMAT08, this was exhilarating due to the amount of effort it requires just to get each and every sentence right and to fit everything in the allocated space. As expected, I can’t much say about the submission itself but this one was my idea and I was responsible for the whole thing.
My visit to Oxford was concluded with a two-day travel back. It was back-breaking (my back is still broken) because of all the walking and the sitting. The paper I presented can be seen on the publications page and the photos of the trip along with captions can be seen on my facebook album. I am currently writing the visit report (to be submitted to the funding agency – ICT R&D) and may upload it if it seems interesting. The personal costs for the trip were 14,000 pakistani rupees including the visa fees. Not bad for a trip to Oxford.
JSR321: Trusted Computing API for Java Platform is now released as Early Draft. Download EDR here (provided under the restrictions of a cost-free review license, which is delivered in detail with the specifications).
That cryptic title basically means that if you search for “search” on Google, the first result you get is for live.com. Surprising but what’s more so is that Google is 12th on the result list – coming after such giants as Search.org, Altavista and Netscape. Who uses those anyway and how come Google itself is doing so great for that?
For the first time in my life, I’m having second thoughts about living in Pakistan. I’ve always argued that there’s no shortage of opportunities or resources in Pakistan and that if someone wanted to work here, it can be done. I still stand by the first opinion but I’m not so sure about getting things done. The problem is mostly the people here. They’re not only ignorant and non-professional, they’re also selfish – this is what annoys me the most. Many people tell me that it’s because of the poverty but I don’t buy that. Most of the people I know are not poor. They’re pretty well-off. They drive expensive cars, they have big homes, they’ve never gone unfed. They still act like there’s a famine coming and if they don’t collect all the money/stuff, they’re going to die of hunger.
Difference between SVN and GIT
The usual answer: SVN is to GIT what revision control is to distributed versioning system. What in the crack pot is that supposed to mean? The answer is pretty simple: a revision control system keeps the whole revision meta-data in 'one place'. A _distributed_ versioning system allows different developers/users/programmers/organizations create different repositories of their own and merge them to a central server as they see fit. They can even keep the changes to themselves (but that's not the point of it). So, there you go. If you get code off Android's git repo and make changes as you see fit. You can commit changes to your local repo, have revisions, do whatever and keep the changes to yourself. If Android was using SVN and you used that, you'd have to go through a lot of trouble trying to keep the changes to yourself while still using the revisions of Android team.
Some important concepts
Clone
When you clone a repo, you take the whole metadata of a remote git repository and store it locally. For example, when you get clone the Android repo from git, you get the meta-data of the whole source in a local repo. (You have to pull the changes to get the actual source, though.)
Commit
When you make a change, you can 'commit' the change and that change gets stored as a revision. A commit in git is recognized by a SHA-1 hash.
Branches
A branch is a specific sequence of commits. An example: The source code is at A, you make some changes and commit to B, then to C and then to D. Afterwards, you create a new branch, switch to this branch, make some changes and commit to P, make some more changes and commit to Q. The revision history would look like so:
P --- Q / A --- B --- C --- D
See why it's called a 'branch'?
Pull
A basic pull is simple. It gets the files from the remote git repo and puts them in the local repo. Things get messy when you've actually pulled once, made changes and committed them in the local repo. Let's see how this goes: Taking the previous example of branch further: You cloned a repo at D. You made some changes and now, you're at Q. However, while you were busy making changes upto Q, the rest of the world wasn't asleep. They worked too and they got upto G. Of course, you didn't tell them what you were doing. So, their repo looks like so:
A --- B --- C --- D --- E --- F --- G
Now, you're in trouble because you have old copies of some files. You need to get to G without losing changes of Q. You 'pull' and git sees that you've made some changes and upates the repo to look like this:
P' --- Q' / A --- B --- C --- D --- E --- F --- G
With Bill Gates already out of Microsoft and Steve Jobs taking a sick leave from Apple, I believe it’s the end of an era for consumer computing. It is my opinion that Jobs is about to leave Apple for good. They just wanted to soften the blow by letting him take a small leave instead of announcing the big departure. Stocks fell even as a result of this and even a rumour of a departure may have been catastrophic. Anyway, it seems that Steve Jobs will be gone and so will the era of desktop computing. Google’s often termed as the new Microsoft. The position for the new Apple is open and Android seems to be putting Google in that position as well. Is this going to be a single super-power situation?
Today, we (actually, Shaz and Sanaullah) got GPS working in the Openmoko phone. We couldn’t get a fix inside the lab but we got one within a minute on the roof. The values didn’t seem to make sense at first but after a little thinking and tinkling, we got the map pointing towards the exact building, within feet of our actual location. A technical description of the procedure will follow soon on the group’s blog (inshaallah).
Disclaimer: This is not a how-to for implementing security frameworks. It will focus on the research aspects of Java Security Managers. If you need to find out how to implement the code, follow some of the references.
A nice article from arsTechnica which explains the basics of assisted GPS. Take a look:
I’ve just finished setting up my Ubuntu desktop just the way I like it – uncluttered and usable. Here is a list of programs I’m currently using:
According to Telegraph.co.uk:
I’ve been unable to write blog entries for a while now. It’s been mostly updates and rants and this post is more of the same. I’m working on stuff which, while not ‘confidential’, can’t be repeated in publicly accessible places due to various reasons. So, I can only provide updates and tell you what I can.
I came across (once again, after a long time) this blog called Blog of Trust with lots of information about Trusted Computing, Remote Attestation and mobile platforms. The author (according to the About page) is an employee of the TCG.
A new research and development project has been approved for SERG by National ICT RnD Fund. This project is being carried out in collaboration with Samsung Information Systems America (SISA). Details can be seen at the project page at SERG site here.
Remember to read updates on openmoko experiences on our group’s blog. I can’t post copies here and SERG blog will (migh?) include experience reports from other members too.
For record purposes, here’s what I did to get Openmoko working.
Regarding paper titled “A Virtual Machine Based Information Flow Control System for Policy Enforcement” by Nair et al.
I couldn't find a straight forward tutorial on how to create an LPM in SELinux. So, here goes. Notice that this is for educational purposes only and would only take you so far. You need to study the implications of LPMs and how SELinux works before you can actually use them.
Assumptions:
- You know what SELinux is.
- You know what types, attributes, macros etc are in SELinux.
- You have read about Loadable Policy Modules (LPMs) and want to use them.
- You don't know how to write and compile/use an LPM.
Setup:
- Set SELinux to permissive. (Not enforcing. This isn't a complete tutorial!)
- Get setools package (possibly from yum)
- Install selinux-policy-devel package (possibly from yum)
Operations: (su whenever you need to)
- Create a directory. I'm assuming /home/user/lpm
- cd into the directory and create a sample policy. (See below for policy where it will be explained). Let's call it myapp.te
- Copy the LPM makefile from /usr/share/selinux/devel. (This comes with selinux-policy-devel)
- Run "make" < compiles the .te file
- Run "semodule -i myapp.pp"< loads the LPM
- Run "cp /usr/bin/tail ./tt2" < copies the tail script here for testing purposes
- Run "touch myapplog.log" < create a dummy log file
- Run "chcon -t myapp_exec_t tt2" < Assign label to executable (see policy for description)
- Run "chcon -t myapp_log_t myapplog.log" < Assign label to log file
- Run "seaudit". Open log file "/var/log/messages" if you do not have auditd installed or "/var/log/audit/audit.log" if you do.
- Run "./tt2 myapplog.log" < Run the file.
- Take a look at the seaudit for auditting details. (See attached screenshots for details)
- Notice the denies. (tail requires many allows which we haven't put in the LPM. You can continue to fix these to get rid of all the denies.)
The policy:
-----------------------| myapp.te |---------------------
We’ve been trying to find a solution for managing out team and the time spent on the projects by each team members. I’ve come across ididwork.com but it still lacks one thing. There’s no way of reporting the hours spent on each task. Add that and it will be everything we need.
[A Fatwa by Mufti Ibrahim Desai of South Africa]
I have joined the Java Community Process (JCP) which is a platform for creation, review and approval of java specifcations in the form of Java Specification Requests (JSRs). My motivation is to participate in JSR321 “Trusted Computing”. The official description is as follows:
My masters thesis has been published by VDM in the form of a book. It’s my first published book and it’s an achievement for me. See it hereon Amazon.
SACMAT’08 Proceedings have been posted online at ACM. Visit here to see our “Model-based Behavioral Attestation Framework”.
If you’ve been working on research papers, you must realize how difficult it is to keep track of latest papers and upcoming conferences. So, here’s the solution. Use Google Alerts to set up alerts for yourself. Here’s a screenshot of my settings. I’ve set up alerts for IEEE, ACM and Usenix for “remote attestation” so that whenever there appears a new paper, I’ll see it. (The CFP thing also works fine. I’ve managed to find many conferences this way.) If you can think of any more alerts, do let me know.
It’s been a while since I wrote something abstract here. I hardly get the time to write something that’s not a paper or part of a (research) proposal. I’m writing this now because of one reason: I’m looking for people who can work with me. Because I’m not teaching full-time, I can’t find students who’d commit to work with me. So, I’m floating some ideas. If you think you might be interested in working on them with me, mail me (or comment here).
I’ve been working on the Shibboleth project, trying to implement the identity management framework and trying to extend it. You’ll have to wait for a paper or thesis for more details about the work we’re actually doing.
A simple XPath example using JAXP only:
After creating a successful environment for web services in Eclipse, it’s time to take things to another level by writing a service that actually does something. Here, we create a web service (still a simple one) which takes the salaries of employees, including allowances, and calculates their taxes. The client sends an XML document and receives the same document back except the taxes are now filled in. Later in our SOA course, we’ll see how these documents can be encrypted and signed to ensure integrity and privacy. Anyway, let’s get on with the web service.
After working for almost a week with outdated and severely complicated yet unhelpful tutorials for web services using Eclipse (Europa), I decided to put together a simple, step-by-step, to-the-point tutorial on how to use a simple, small web service. It’s mostly a screencast with some explanations.
We’ve just submitted a contribution to SACMAT08. For those of you who don’t know it, SACMAT is the conference for access control. There are many big names in the program committee and its one of the most prestigious conferences for computer security. Regardless of acceptance (and of the fact that I’m only the third author in the paper), I’m glad of the submission. It was a really nice experience preparing a paper for that big a conference. Now, we wait for the notification.
If you’ve been hit by the Trojan masquerading as an avi – “Funny UST Scandal.avi.exe”, you need to read this post.
UML is an essential tool in SE today. I’m especially interested in finding ways of introducing MDE to students and for that UML and OCL are an essential requirement.
Internal evaluation marks for all my subjects are now online. They will be updated to reflect the latest.
I came across this homepage of Frank Pfenning – a CMU professor. He has lots of course handouts on different subjects including compilers, logic programming, automated theorem proving etc. Shaz, you might find the compiler notes helpful. The handouts have questions and exercises too.
An important but neglected aspect of designing for the web – and in many places, for print – is typography. It’s really important part of presentation. Here’s an presentation describing typography for web. It has audio/transcript of the talk in the conference too.
Web Typography Sucks | Slides and notes from SxSW 2007If you’re wondering what AI people are doing nowadays – and you might be doing just that if you’re trying to finish the final assignment I set for my AI course – you might find this link useful. Stanford guys seem to be doing really good on the DARPA race challenge. There’s also an interview with the designer by Robert Scoble.
I just got signed up for Virtual Ubiquity’s “first real word processor for the web”. It’s called Buzzword and it’s lovely. I’ve just seen the first introductory document but many things have caught my eye.
I’ve created a facebook group related to Isabelle. I hope to get people working with Isabelle onto that group for collaboration. If you’re interested in either Isabelle or formal verification, join up!
If you’ve been having trouble with deployment of Visual Studio .net 2005 (C# or VB) applications which use Crystal Reports, rest assured. You’re not alone. You can find many posts and blogs saying you should add the merge modules but if you’re having problems getting the setup to work, here’s the solution:
The update is a little late (a week late to be precise) but it’s here.
I’ve recently re-discovered Eclipse. My first encounter with it was back when I was learning Prolog. I worked with it and while I liked the work-flow, I never got to using it full-time. It’s back and it’s staying.
Two of the better conference management software: Both are free and both are based on PHP/mysql. I prefer the MyReview software because of the better management. Take your pick.
Instead of trying to write lots of LaTeX help myself, I’ve decided to post links to good LaTeX resouces. Here’s one which is very comprehensive. I may write crash-tutorials about specifics but there’s really no need to re-invent the wheel trying to write how to make glossaries and indexes.
Using tables with LaTeX is a little tricky. The good thing is, once you get the hang of it, it’s really very clean. Here’s a crash-tutorial on how to use tables.
After attending CSEE&T and ICIET conferences, I am back to Peshawar. Besides getting to travel half way around the globe without spending much, I now have two publications to my name. You can take a look at them here.
I’ve been in Dublin City University (DCU) for two days waiting for the conference to start. Today was the first day. We had a presentation from two guys from Carnegie Mellon University. The presentation, besides being very informative, was absolutely entertaining. Anyway, these guys conduct seminars (mostly small ones of two days) and I’ve persuaded them to do one in Peshawar. They have estimated the cost to around $12,000 which comes around to PKR. 7,00,000 – which isn’t much for universities. I’ll talk about this to concerned people when I get back to Pakistan.
I’ve been working on formalization of UML and OCL for some time. Of course, specifications are necessary for formalization but they’re also helpful for learning the tools themselves. If you’re working with UML and/or OCL, you may find these specs helpful:
I’ve just finished installing/configuring HOL-OCL (except for the X-symbols configuration). This was a pretty complex process and the documentation is pretty scattered. Here’s the flow I followed:
I wrote this article back when I was learning to cope with CSS layout. It’s not the best one around but it’s certainly the simplest. It assumes you’ve been working with CSS for font styles and colours and are comfortable with designing layouts using tables. I uploaded it on my old site but that site is no longer there, so this is an update post.
I’ve worked with Z notation now for a complete specification and here are my thoughts regarding the experience.
Isabelle is a great tool for automated theorem proving. I don’t need to tell you how great. It also comes with a great PDF generating tool which can help you create proof documents really easily. Here’s how you can create PDFs from your THY files:
This is the first formal specification I’ve created using Z Notation. It’s based on the usual Birthday Book example but is a little different. It also has some information regarding use of ZETA for type-checking the units. See links below for the source and generated output.
Here’s the second presentation in the series. It deals with how HOL-Z can be used. It is only a skeletal presentation because honestly, you need to do a lot of reading before you can work with HOL-Z. This is just a rough guideline about the procedure followed. Here’s the link:
I’ve just finished creating the first presentation about using ZETA for creation/analysis of Z Notation. It’s a basic presentation and is not meant to be used as a reference. See a good book for Z notation (Using Z is pretty good) and the ZETA site for the tool’s reference. The presentation is more about experience in learning to use these tools.
Installing HOLZ isn’t as easy as you may think it would be. After much efforts, I’ve managed to do it and I thought I should post it here to save you guys some time.
If you’re like me, you’d hate the default look of web pages (especially gmail) on firefox in Linux. I was beginning to think something was wrong with firefox because the rest of Linux fonts look alright. This is what I got after tinkering around for a day. Looks sweet, doesn’t it.
Well, it’s been a long time but I’m finally back. The reasons for such a long absence are countless but boil down to just one: I got lazy.
This is the final listing of Internal Evaluation for Fall 06 semester of CSC422 in City University. The marks submitted in final evaluation sheet to the examination section are not properly categorized (because of unavailability of space). Please do not bug me about low marks in presentations. The details of marks there do not mean anything. Take a look at the total there and the details here.
One of the best designs of a web app I’ve ever seen. Lovely work. And they’re also offering an object oriented Javascript framework for free!
Sami is a friend of mine and a fellow photographer, programmer, designer, philosopher and God knows what else. He’s finally got his own domain+site. Visit his site and pay special attention to his photography. I’m sure you’ll like it.
I recently came across an article by a famous computer scientist John McCarthy titled, “Scientific Forms of the Religious Hypothesis”. It is an informal discussion of the possibility that the world we live in is programmed by an intelligent being.
I’ve compiled all the marks for quizzes and assignments for Fall 2006 of CSC-422.
I simply can’t find a blog posting software good enough to be used with wordpress. Wordpress’ dashboard itself is just not fast enough - especially on my 56k dialup. Let’s see if this post (using Windows Live Writer) turns out to be ok.
Well, worry no longer. For all you designers out there who’ve been having trouble with picking the right color, go see kuler. It’s sort of like Color Schemer. Lovely themes designed by the users. Do add your own to it.
I’ve recently started working on Intelligent Agents. I chose to work with Java because I’m more confortable with object oriented approaches and there’s more AI literature based on Java than any other language.
Just finished another space project. It’s uploaded on deviantArt because I can’t access Gfx.
I’ve finished all questions of the World’s Smartest Person Challenge 2006. I’m pretty sure about 11 of those questions. Three were ok. The other 11, I had no idea. Guess I’ll just have to wait and see what happens.
Muslims have a lot of misunderstandings regarding “ilm”. You would’ve seen promos saying “Ilm is incumbent on all muslims, so send your children to school” and the such.
We may not be the “World’s Smartest Person” but it never hurts to give the brain a little exercise. International High IQ Society is conducting an intelligence tournament at
To claim my blog, I have to post this link in my blog:
I’m always surprised when someone tells me that MIT’s OCW is not free. It stands for “Open Courseware” for God sake!
I’ve started working on my AI and Lisp notes. You can view them here.
I’ve been saying this for a long long time. Here’s a quote in case you need convincing:
Although none of you have actually said anything about the assignment I set (except maybe the usual ‘it doesn’t work’), I’ve decided to give you guys one more chance. I’ll be taking a class on Wednesday, August 16. Somewhere around 11 to 12.
I won’t be taking any more extra classes of VB.NET untill I’ve received some response from students regarding .netTiers and Codesmith assignment I set in the first lesson.
As promised, I’ll be giving extra lessons for VB.NET in City University for all who are interested. Please understand that these are not step-by-step tutorials. I’ll be giving you guidelines only and I expect you to do most of the work. We’ll take it one class at a time. Here’s the details for the first class.
TinyLittle Password Keeper is, as the name implies, a tiny software for securely saving all your passwords in one place. It has the following features:
Last time I installed Google Earth, Peshawar was only a vague shadow of a land. I installed beta of Earth 4 yesterday and located Hayatabad. The images are now copyright 2006 and are pretty vivid. I’m putting an image of Phase V here (along with a shot of my house).
I recently came across Codesmith and .netTiers. It’s one of the best things to happen to me since i started working in VB.NET. You can view the details of what these two are in their sites. Here’s the gist:
I received this very useful link through a mailing list today. Maulana sahab is a khalifa of Hakeem Muhammad Akhtar sahab (rehmatullah alaih). The site has lectures, dua`_s and books for download. I’ve downloaded the english commentary on _Mathnavi Room.
One of the problems I always faced with linux was the installation of new software. I’ve been trying to get a good lisp IDE installed for more than three weeks - without any success.
It took me a year but I’ve finally moved my stuff over to Linux. I had to. I’m supposed to be a geek.
Ok, since blogspot simply refuses to appear on any system here in Peshawar, I’ve decided to move over to Wordpress.com. At least I can write my blog here. Anything that goes in blogspot ends up in a blackhole. I can read it myself using an RSS editor but since hardly anyone else uses RSS readers here, it’s no good.
I’m about to finish my class in Brains Degree College. I think I’ll be teaching VB.NET for the next 100 years. I’ve already got another one in City University. It’s a BCS and MCS merged class of about 25.
Just tried Macromedia’s (now Adobe) Dreamwever version 8. It’s simply great. It’s the only editor I’ve seen so far which manages to capture the soul of latest developments in CSS. It creates CSS layouts automatically! Hand-code a CSS page and you’ll see why I’m so excited.
I’ve been busy as a bee trying to finish the flash verion of Quaks website. It’s almost finished now. The skeleton is up and only a few screens remain. It’s basically just text that remains now. Even that is ready. I just don’t have it with me right now.
I’ve finally managed to attend a class (as a student, that is). My MS classes have started today. For those who don’t know (and for some obscure and unfathomable reason, still care) I’ve gotten myself admitted in MS programme in City University. It’s a research based programme and it’ll take two years. Inshaallah!
I don’t maintain a blog here. My “official” site is www.recluze.net and my blog is on blogger.
I’ve finally finished writing (and publishing) my article on “CSS Layout”. I’ve converted it into a handy PDF all pretty and formatted. Took me two days just to format it in InDesign. (I had to learn the tool while doing it!) Here are the details.
Google’s orginal research papers (when it was called BackRub)! I’ll give them some time too. I just have to at least see these papers, even if I don’t understand them.
Just went to Macromedia’s site. Adobe’s completed the merger and Macromedia is no more! I love Dreamweaver and Photoshop. Just hope Adobe keeps the good features of Macromedia. It’d be a waste if they decide to ditch Macromedia’s interface in favour of their palette system.
Wish a very happy eid to all my friends and readers. (Whatever few there are.)
We still haven’t got DSL here and I hear they’ve started offering internet through power cables! Current Communications have partnered up with Google too. Take a look at How It Works.
Ok, webmasters who haven’t used Google Analytics yet need to wake up and give it a go. It’s a very useful tool for visitor tracking. Reports about pageviews, visits, loyal visitors, useful content, referrers and other such useful stuff are so easy to manage. It’s a must-see for those who run a site and don’t have a very powerful statistics software.
I’m back. With a new template. It’s not fully functional yet so, bear with it for a while.
I have completed my article on CSS designing for the experienced HTML coders. I’ve submitted it to A List Apart. I hope to get it published there. If it doesn’t I’ll publish it here instead. (It won’t nearly be as good but still, have to put it somewhere.)
I’m into Illustrator now. Here’s my description of my first work in vectors:
Take a look at CSS Zen Garden if you’re still working with Dreamweaver and bloated HTML tables for designing your sites. Honestly, you need to stop. I’m surprised Dreamweaver’s still using that technique for screen design. Then again, Macromedia’s a business. I’d expect that from them.
I finished the test phase of my Ultimate Walk on Monday. The walk was from Nowshera to Peshawar. Here’re the details:
Microsoft research is working on Singularity which, if I gather correctly, is an OS written in C#. They say it’s about reliability more than performance. It has to be if it’s going to use .Net’s CLR. That thing is bloated!
I’m finally feeling a little better. Been quite ill the past half a month. I couldn’t do anything. No AI, no LISP, no Photoshop. No designing! All I have been able to do is read and blog. Better get back to work now.
Windows Live
Yes, Microsoft’s reply to Google’s Personalized Homepage. I didn’t think I’d have to say this but Microsoft’s finally beaten Google at something. (Well, ever since Google started rolling anyway.)No, this isn’t just another average IQ test. I came across this test (or rather, these tests) a year and a half back. Most tests I’ve seen are more about understanding of English than about intelligence. This one (although I still don’t see how a test can measure intelligence) is far better. Take the “Ultimate IQ Test” and see if you score higher than me. I got a 139 last time I took it. Do tell me if you even attempt the “Test for Exceptional Intelligence”. That one’s sure to give you a headache.
[SimpleBits Anatomy of an Icon](http://www.simplebits.com/notebook/2004/08/23/anatomy.html) They say stuff like “Gmail’s blown away” and “Much superior to Gmail” but the only thing I see is that they’ve turned the usual web-based mail experience to the usual desktop experience. Find screenshots of Yahoo Mail beta and Hotmail Beta and it looks just like Outlook.
Microsoft’s in more trouble. Google’s great work with linux has finally convinced the computing giants that Linux is the only possible replacement to Microsoft’s monopoly on desktop operating systems. Linux is now being backed by IBM, Intel, HP and others.
These fonts may not be very versatile but they’re good for formal stuff. Especially if you can’t spend a fortune on Adobe’s Fontfolio.
I’ve been looking for an online application for storing my bookmarks for ages and it was sitting right under my nose. del.icio.us is just the thing I wanted. I have yet to see though, how it imports my hundreds of bookmarks already sitting in my Firefox Bookmarks folder. The import feature is down for maintenance. *Waits*
If you haven’t used WebUI3.0 for ASP.NET, you’re missing a very neat component. Do give it a try. Neat menus, grids and other controls. This article gives an introduction to the AJAX features of the tool.
The new Office (version 12) sees a total rewamp of the UI. I don’t think this would be such a good move. People don’t accept changed easily. As me and some of my friends are used to saying: “Never underestimate the stupidity of general public”.
Joe Cashman’s put these screenshots of Windows Vista Build 5231. Although you can only see the interface changes from these shots, they look pretty cool. I wasn’t much for the XP interface but I think I’m going to move away from the Windows 2000 interface if I get something like this on my desktop.
Now that’s putting technology to use! If that ‘added advantages for elderly…’ wasn’t there, I would’ve said someone needs to get a life! As it is, it’s a pretty neat trick.
Google’s awake again. This time it’s the RSS feed aggrigator. I’ve seen the famous Newsgator Online and I must say, although Newsgator probably had more features (although not apparent), the Google interface is much faster and easy to use. It’s another step towards Google’s online software. Looks good. It’s still in the Labs though.
The Web2.0 Conference has just finished. What’s Web 2.0? It’s an idea (for lack of a better word) that people should be the publishers of content on the internet as well as the consumers. Here’s a Wired news article on the conference. Lots of good links in the article. Follow the links to see more of the latest on the web.
Here’s for those photographers who’ve been visiting my blogs. There must be someone.
Of course, soon we’re going to need an IDE to do all things AJAX for us. Microsoft’s started working on this with Atlas Project. I bet Dreamweaver will have some support for it in the very near future. Probably as soon as version 8.
Well, since no one’s paying any attention to my questions regarding the use of AJAX, guess I’ll have to go along with the current implementation of the technique. For that, I’ve found another thorough article.
I recently came across this article that explains a lot about how Google’s primary source of income Adwords works. Give it a read. Although it doesn’t explain anything about the algos, the logic is pretty interesting in itself.
Satellite images have always been my favourites. Now I’ve got a way to get all I want. And what beter way to start than with MasjidulHaraam and Masjidun Nabi?
Looks like machines are finally starting to get more intelligent than humans. I came across this on Google’s own blog. Do a search on ‘ failure ‘ in Google and see the first result that comes up.
I’ve been working on Calculus and Analytical Geometry for about a month now. I’ve used lectures by Dr. Faisal Shah Khan of VU, Pakistan. I would rank him with some of the best teachers I’ve ever studied under. He built up the subject very nicely and has given me a thorough understanding of the matter. I just wish I had his email to send him a note of thanks.
You keep saying I write nothing about non-Google stuff. Here it is then:
For my web developer friends, XForms technology is something that you can miss, but not for long. This is what ASP.Net’s server-side forms are all about. W3C’s working hard on this and it’s going to be in as quickly as XHTML took over from HTML. Don’t get left behind if you’re planning on staying in web development. I stumbled upon a basic intro. Find out more and let me know too.
Well, maybe Microsoft does do it. Just not that openly. Google makes sure it can attract the best of brains from computers and business. How? By telling them they won’t get the one worst feared thing: boredom! For those who’re up there in the high IQ range, boredom is the monster. Google doesn’t just play jokes, it also makes sure that the corporate culture remains as stress free as possible. I hear Microsoft does that too. It’s just that you never actually see them doing it.
Darren Neimke has done wonders. Dunno why it took so long. Maybe because so much’s happening on the commercial side that the Giants are not very willing to invest time in something as ‘small’ as blogs. Service independence with blogs is what we needed. Neimke has given it a start. Now it’s upto Blogger, Wordpress, Movabletype and such to take it further.
Out of Microsoft Sandbox comes Start.com. Take a look and tell me this isn’t taken straight from Personalized Google. I mean, come on guys. Do some innovation. It won’t do much good simply following Google’s tracks. That was what other companies were doing when Microsoft was innovating back in the 90s!
I was wondering what Google was doing with a web accelerator. Sounds like they’re heading into the ISP business as well. Seems like a very good idea since they’re already offering ad-based services and (as many are predicting) going for the browser and operating system market, an ad-based internet service would be a very nice way to plug everything into the Google Browser.
The home of MIT has some more problems for Microsoft. Just recently, Massachusetts government proposed a plan to use OpenDocument format (open source and based on XML) for all official purposes.
One of the things that all the internet-enabled applications need right now is service independence. This is to say that the way we connect to a certain application should have no effect on who we can communicate with. As in email, if you’re using Hotmail or even your local ISP’s mailbox, you can still communicate with any other mailbox. Why not the same with IM or voice chats?
I came across these posters on SquareFree blog. I know a few people who can learn from this.
I uploaded another artwork on Gfxartist.com after a very very long time. Sami’s new camera did a real nice job with a steel glass. I called it Dark Crescent. I’ll upload another one soon.
I was surfing and came across this really nice-looking blog. I just had to find out how the guy had made it and guess what! It’s a free software.
Just came across these really good links. The first one is for those who hate writing (or are bad at it). Take a look at some very good pointers to good writing:
Just came across a very good link for inserting footnotes in web pages. This is extremely useful pages publishing researches and articles. Take a look: Format Sidenotes with Javascript and CSS.
Take a look at this:
Finally! something about Microsoft too!
In my opinion, creating a cental, free, cross-platform operating system lies in the very near future of the web. (That free part being optional actually but I like putting it in there.)
I’ve been working on these two for the past few days and I must say that Google’s softwares are only getting better! A lot better.
Well, it’s finally here! Google’s instant messaging software. It’s called Google Talk and from the look of it, it’s pretty cool. Just a 900k download taking less than 5 minutes even on the slowest 28k connections, it installs like a breeze. (When I started using Hello, I was thinking it was going to be used for Google’s IM. Well, Talk is better!)
Ok! NOW we’re talking XML. Intel’s started worrying about hardware processing XML data. This should lead to all sorts of interesting stuff. Hardware actually understanding data!
I’ve been reading a lot about this AJAX (Asynchronous Javascript and XML). Just recently I discovered the process by which it works and I was astonished to see that it took people so long to actually realize this possibility. I’d put forward this proposal quite a long time back (Althoug I must admit - not that seriously) of loading only partial content in a webpage much like in frames.
This blog is designed to be a source of sources of inspiration/education for upcoming artists/desgners. It’ll cover both traditional art and digital art (2D and 3D)
A blog about my doings with Artificial Intelligence. It’s supposed to be used to educational purposes. As well as to keep myself organised.
These are works which can’t be categorized in any of the other places. I’m planning on doing some research in my MS. Those papers will get their own section. These are papers/articles or other stuff that I did as a hobby.
I really can’t manage to put my artworks here on my own site. First, it’s too annoying. Second, I won’t get many views and comments. I publish my artworks in two galleries as of now.
[This page is a work in progress….]
[This page is also a work in progress ….]
Foremost I am a Muslim and Pakistani. And I am a student/designer and just recently, I’ve finished my B.Sc (Hons) in Computer Science. I was born in ‘83. Do the math to get my age.