Monday, March 24, 2014

Welcome to Germany...and Welcome to the Suck

First of all - the second phrase in the title above is just a pun by the writer. The writer dedicates this blog post to the group of 41 products of German A-Level Preparatory Program (GAPP), which arrived to Germany via its Frankfurt International Airport a.k.a. Fraport on the last March 15, 2014, and to the current GAPP students at the German-Malaysian Institute (GMI) in Bangi, Malaysia. This article is intended to provide simple yet sufficient information for them about the main challenge that awaits them in Germany once they arrive here: the TestDaF.



On Saturday March 15, 2014 - a group of 41 future students arrived at the Fraport. Once they came out from the arrival gate in Fraport Terminal 2, they were led to an area in the Terminal 2. There they were given short briefings by 2 officers from the General Consulate of Malaysia in Frankfurt am Main. Afterwards they were separated to 4 groups - each group would then journey to a different state in Germany: Bayern (Bavaria), Sachsen (Saxony), Nordrhein-Westfalen (North-Rhein Westphalia / NRW) and Hessen (Hesse).  At each place they must then undergo a preparation course for the ultimate German language test for them - the TestDaF / Test Deutsch als Fremdsprache (German as Foreign Language).

The writer congratulates them for making it this far and hope they have adjusted themselves well in their first week in Germany.

Financial Management during the Language Course


In a briefing by one of the officers, students were advised to manage their allowance smartly and told to spare a certain amount of money from their early allowance for certain reasons. From their monthly allowance they must pay for living costs: mostly for room rent, health insurance, cellphone bills and of course foods and drinks. Here the writer would like to urge these students to refrain from spending on large (read: expensive) items such as TV-Monitor, desktop PC, musical instruments etc, which would then trouble them during the process of relocation to their respective college.

The process of moving into a new rent room always involves a big sum of money. They need to consider the costs of transportation, deposit of the rent (which is usually 2 or 3 month of monthly rent), the first month rent, new furniture and so on, hence the reminder of sparing some money from their early allowance. Apart from those, they must also be prepared to pay the semester fee (€ 200 and above).

The TestDaF


From here onward, the writer addresses the 41 students as TestDaF candidates. The writer welcomes comments from other fellow students who have also experienced the TestDaF, especially those who scored 16 points and above, to share their opinions and tips.

The writer took a liberty to briefly view the website of TestDaF-Institut [1], to refresh himself on information regarding the TestDaF. The following is the summary on TestDaF along with tips/suggestions by the writer. TestDaF candidates are hereby recommended to read further information and tips at the official website (the website is unforgiving - everything is in German, but that is the whole point - to test your German language competence). The writer predicts that all 41 candidates will do their TestDaF on July 15, 2014 [2].

1) The Structure of TestDaF


The following image (Fig. 1) shows that TestDaF is divided to 4 parts in chronological order:

  • Reading comprehension (Leseverstehen / LV),
  • Listening comprehension (Hörverstehen / HV),
  • Text composition (Schriftlicher Ausdruck / SA) and
  • Oral (Mündlicher Ausdruck / MA).

Figure 1: The structure of TestDaF [3]

The total time of the test is 3 hours and 10 minutes, without the break time. The answer papers with the recording of the oral test (yes, it will be recorded) would then be sent to the TestDaF-Institut in Bochum for evaluation [3]. It takes at least 6 weeks until the result will be released.

2) Grading

The test result on TestDaF-certificate will be ordered in 3 grade levels to all 4 parts:
  • TestDaF-Niveaustufe 3 (TDN 3)
  • TestDaF-Niveaustufe 4 (TDN 4)
  • TestDaF-Niveaustufe 5 (TDN 5)
The highest grade is TDN 5 - which makes the total highest grade overall is 20. If a grade is below 3, then it will be displayed as 'unter TDN 3' - which is obviously undesired by any German university. In comparison to certain English language certificates which are only valid for 2 years, a TestDaF certificate is described as 'valid without limit' [3].

3) The Required Grade for Enrollment


A candidate is considered to have passed the TestDaF if the total grade or points is 12 (TDN 3 multiplied by 4). To the writer's knowledge, so far only colleges in Bayern that accept such result. The writer would like to shift the reader's attention to colleges in other states, particularly in Hessen. This can be regarded as a highly significant case study.

In the process of application for a placement at a Hessian college, generally it is sufficient for an applicant to provide that she/he has acquired 15 points.

HOWEVER, upon enrollment the candidate must provide a TestDaF-certificate with minimum 16 points, with minimum TDN 4 in every part of the test (4 times TDN 4). The reason behind this is: applicants with 15 points are expected to re-sit the TestDaF and improve their results after sending their college application.

To clarify this matter, last year the writer made a phone call to the Director of International Affairs of Technische Hochschule Mittelhessen and consulted the advisor-in-charge for foreign students of Hochschule Darmstadt. A common point from them was the logic of requiring every applicant to get 16 points and above. They insisted that foreign students should be competent in their German language, to provide the very basic strength in doing an undergraduate degree in Germany. The writer could only agree with them.

4) Tips/Suggestions


As a starter, the writer suggests that TestDaF candidates go through the TestDaF website and download everything available to help them: from the sample test papers in PDF format to the audio files for HV part in MP3 format.

Be active when possessing all those materials - analyze them.

Read articles that come along with tables and graphs. Many phrases to describe the statistics are so useful that they can be applied later especially in the part SA of the TestDaF.

Candidates should also always practice to answer the oral questions effectively. Their all hi-tech gadgets should be utilized to record their voices and replay them. Do mock oral tests during free time.

Stop listening to MP3s when candidates are in places full of German-speaking people. Pay attention to their pronunciation, accents and tones. Try to emulate their accent. Try to slightly understand the topic of their conversation - it may be a dry humor, or may be about their music taste, outing plan, their train destination, how old they are, what kind of pets they have, the current political situation in EU or elsewhere, etc. Whatever. Anything.

It is important to remember why all of this matters so much. The candidates should bear in mind that they will have to attend countless lectures, spend hours to write lab reports, digest lecture scripts and notes - everything in German. The most challenging part would then be to write the final year thesis (Abschlussarbeit), for which bachelor candidates are required to write in impeccable German, before presenting it during a colloquium for final evaluation.

Conclusion


The candidates should fully utilize their 4 month-course to prepare themselves for the TestDaF. The writer urge them to NOT regard this 4-month-period as a rewarding time for them after passing the GAPP course in Malaysia. Instead they should take this as an opportunity to put their German knowledge in practice. No more simulation of dialog - but real-time conversation with native speakers. The candidates are also urged to aim for 16 points or above, for it shall open many doors to them afterward. The writer wishes all the best to the TestDaF candidates and again: 'Welcome To The Suck'*.

Sources:



*borrowed from the catchphrase of the film Jarhead.

Monday, February 10, 2014

MATLAB Code to Generate a Chessboard



In the last 2 years, the writer attended a lecture on Linear Filters in Image Processing. Among the various assignments was to write a function which generates a chessboard/checkerboard, which then can be visualized as a conventional 2D image. This is a tutorial on how to apply a function called 'schachbrett' (the German word for chessboard) in MATLAB [1].



Why chessboard?
Figure 1: An artificially generated image of chessboard (256 x 256 pixel)

The chessboard (Figure 1) was deemed an interesting object to investigate frequencies after applying Fourier Transform. The test would looked like Figure 2 and Figure 3 below.

Figure 2: The real part of the Fourier Transform of lohSchahmat

Figure 3: The real part of the Fourier Transform of lohSchahmat (as a 3D-mesh plot)
The results would look finer if the writer had applied:
  1. a higher number of pixel and/or
  2. a higher number of fields. 

The function schachbrett()

This function takes 2 arguments - namely the no. of pixel and and the no. of fields to be displayed.

function [chessBoard] = schachbrett(noPxl,noField)

And the output is - chessBoard.

For security, the writer set default values as follows:


% Setting the default no. of pixels
if noPxl <= 0
    noPxl = 10;
end

% Dimension of the board => noField x noField
if noField <= 0
    noField = 2;
end

The here is where the magic happens:

boardTemp = 255*[ones(noPxl) zeros(noPxl); zeros(noPxl) ones(noPxl)];
chessBoard = repmat(boardTemp,noField/2,noField/2);

Firstly a 2x2 board of ones and zeros are generated, which resembles an identity matrix, except that this matrix is NOT an identity matrix. Then it is multiplied by the value of 255, so that all values of 1 become 255 (the color white in 8-bit grayscale).

Then the matrix is replicated with the help of a built-in MATLAB function called repmat() - replicated as half as the number of fields given as the argument noField in schachbrett() above.

How to apply the function schachbrett()

This step is very easy just like below, which has generated the image in Figure 1 above:


noPixel = 2^5;
noLineColumn = 2^3;
lohSchahmat = schachbrett(noPixel, noLineColumn);
figure('Name', 'BetHaMikdash'),
imshow(lohSchahmat)
title('Rosfah Schlomo')

That is all. Have fun with coding in MATLAB!

Remarks:

[1]. MATLAB is a registered trademark of The Mathworks, Inc. The code above was strictly used for academical and research purpose.

Saturday, January 4, 2014

FingKinector - Interacting with the Kinect Motor



The pivot which connects the Kinect sensor to its base is motorized. This post is about an app called 'FingKinector', which is developed to utilize that motorized pivot without having to rotate the Kinect sensor manually. This is tested only on the Kinect sensor for XBOX 360 and developed for Windows 7.

"K.I.S.S. = Keep It Stupid, Simple"

Image 1: Kinect Sensor for XBOX 360, equipped with a wide-angle lens.

To be able to control the Kinect sensor from a PC, you will need an AC-adapter for your Kinect. It costs around € 8.00 on the Amazon. It has 2 outputs: the orange plug connector is used to supply the Kinect with 12 V at 1 A, whereas the second output is a regular USB connector [1].

If your Kinect is connected to your PC for the first time, by default Windows will attempt to automatically download and install the driver for that Kinect, which comes from PrimeSense. PrimeSense is the developer of the range camera in the Kinect sensor and it is an Israeli 3D sensing technology. As of this time - PrimeSense has become a subsidiary of Apple Inc [2].

At the bottom of this post, the writer puts a link for you to download FingKinector.

FingKinector works in 2 options:
  1. Single run
  2. Sequential run
The following image shows the first mode (single run). It is known from [3] that the motor is allowed to be tilted to an angle between -27° and 27°.

Image 2: Single Run mode on FingKinector

The second mode, as seen in Image 3 below - the sequential run, uses a factor to divide the range [-27°,27°] up to 10 sectors. By default this mode will first turn the Kinect to the position of 0°, then starts the sequential movement from either top (at 27°) or bottom (at -27°).

Image 3: Sequential mode on FingKinector

The writer also took a liberty to record an amateur video to demonstrate the sequential mode. The Kinect here is seen with an extra hardware called Kinect Zoom Wide-Angle Lens by Nyko [4]. Its cost is around € 14.00.



Sources:

REMINDER / WARNING:
  1. For Windows only. (Linux version will be made available in the next development)
  2. The writer is NOT liable for any damage.
  3. Use at your own risk.
Have fun!

Friday, September 13, 2013

A Stupid and Simple App: FingCryptor



Julius Caesar used to apply a simple trick in sending his protected messages of military significance. The trick, coined as 'Caesar cipher', is one of the simplest and widely known encryption techniques. The writer took the liberty to apply this technique in his program called 'FingCryptor'.

"K.I.S.S. = Keep It Stupid, Simple"

In this spirit, the writer has developed this application in order to assist him in his passwords management. The Wikipedia article on Caesar Cipher [1] is the main source as the guide to develop this application. The GUI - graphical user interface, is designed on Qt 4, whereas the codes for this application are written in C++. The writer is also planning to expand this application and making it more complex albeit low security in the future.

The following image shows how to understand Caesar cipher at its fundamental principle - i.e. shifting any letter three steps backwards.

Image 1: Caesar cipher left shift of 3 [1]

The main advantage of FingCryptor: the writer extended the use of this operation on all ASCII characters e.g. '@', '#', '?' etc, including numbers from 0 to 9.

Images 2 and 3 show the usage of FingCryptor.

Image 2: The ciphering on FingCryptor

Image 2: The deciphering on FingCryptor

The first version of this application is available for download at the bottom of this post. 

Source(s):

[1] Caesar cipher (Wikipedia): http://en.wikipedia.org/wiki/Caesar_cipher

REMINDER / WARNING:
  1. For Windows only. (Linux version will be made available in the next development)
  2. This application is NOT intended for any high security objective.
  3. The writer is NOT liable for any security breach - i.e. deciphering by a third party etc.
  4. Use at your own risk.
Have fun!

Download link:

Friday, December 14, 2012

Plotting a pentagram with MATLAB.


Figure: As seen after running the code

This is a MATLAB code to plot the symbol of pentagram on a Cartesian coordinate system. The symbol consists of 1 circle and 1 pentagram - a 5-pointed star drawn with 5 straight strokes.

Basically this algorithm focuses on the getting the coordinates to draw:

(1) the circle and
(2) the horizontal line.

Later the horizonzal line is manipulated to generate the other 4 lines to form the pentagram.



Contents

The variables

n = 2^8; % Number of sampling points
t = linspace(0,2*pi,n); % Interval
noSides = 5; % Number of sides of the polygon
innerAngle = 2*pi/noSides; % Interior angle of a pentagon.

% Variables for the cirle
r = 2; % Radius
h = 0; % Transition distance
k = 0; % Transition distance

xsfact = 1.3; % Factor to extend the display range of the xy-axes.

Equations for the circle

x = r*cos(t)+h;
y = r*sin(t)+k;

Equation(s) for the horizontal line

% The length of the horizontal line
lH = r*sin(innerAngle)*2;
% Distance to the horizontal line from the center
dist_lH = r*cos(innerAngle);
% The definition interval of the horizontal line
xH = linspace(-lH/2, lH/2, n);

Rotation

Here the horizontal line from the previous will be simply duplicated for 4 times. Every point (x,y) will be multiplied with a 2D-rotation matrix.

side = zeros(2,n);
side(1,:) = xH;
side(2,:) = -dist_lH;

side1rot = rot2d(innerAngle)*side;
side2rot = rot2d(innerAngle*2)*side;
side3rot = rot2d(innerAngle*3)*side;
side4rot = rot2d(innerAngle*4)*side;

Plotting

figure,
hold on
plot(x,y, 'r')
plot(xH, -dist_lH, 'r')
plot(side1rot(1,:), side1rot(2,:), 'r')
plot(side2rot(1,:), side2rot(2,:), 'r')
plot(side3rot(1,:), side3rot(2,:), 'r')
plot(side4rot(1,:), side4rot(2,:), 'r')
hold off
axis(xsfact.*[min(x) max(x) min(y) max(y)])
title('Das Pentagramm')


Monday, December 10, 2012

Report on the Seminar: Media and Democracy



On the last Nov. 2 until Nov. 4 of 2012, World University Service e.V. (WUS) through its wing STUBE Hessen (stands for STUdienBEgleitprogramm) organized a weekend seminar with the theme: Media and democracy: On methods and means of mobilization. This event was held in a youth hostel in Fulda, a Baroque city located to the east of the state Hesse. Around 18 foreign students were present, all from numerous Hessian colleges - Frankfurt, Darmstadt, Fulda, Marburg, Giessen and so on. Three presenters delivered talks during separate sessions and it was moderated by a representative of STUBE from WUS headquarter in Wiesbaden (the capital of the state Hesse). This is the writer's report on this event.

For participation on its programs, STUBE targets foreign students from Asia, Africa and Latin America. Students of nationalities such as Mongolian, Chinese, Chilean, Mexican, Georgian, Albanian, Kenyan, Nepalese, Syria etc were spotted during this event.

During the introduction session on the day of our arrival, participants were introduced to the President of the Uni. of Applied Sciences of Fulda, Prof. Dr.-Ing. Karim Khakzar, who was accompanied by his daughter. He expressed welcome to us to the city Fulda and briefly informed us about his college.

The talks/lectures

Among the objectives of this seminar was to discuss some questions on the social media, which is proven to be a critical factor in today's politics everywhere in this world. This was so as many recent and current events - London Riot, Arab Spring, Barack Obama's Presidential Campaign etc, were known of involving a lot of mobilization via social media such as Facebook, Twitter, Reddit and so on. Therefore the invited lecturers were picked from relevant backgrounds - one graduate student of information science, an NGO activist and a journalist who happened to be an active blogger. All talks were delivered in English.

The first talk was delivered by a Vietnamese postgraduate student from Darmstadt, Mr. T.A. Nguyen. He gave a presentation which taught the pariticipants about the Internet and its impacts. Began with the introduction to the Internet, he lead us to the issues of network security, related incidents such as the London Riot and Wikileaks and censorship.

Then Mr. T. Kowohl, a law clerk by profession, talked about NGO-campaigns, mentioning some case studies from Amnesty International, of which he is a member. His objective is to show us the risks and benefits of social media froma legal perspective. He also requested us to form groups, in which the participants were to discuss make suggestions to Amnesty International on how it should conduct its campaigns everywhere.

On the next day, the final talk was delivered by Mr. J. Kucharz. who is the editor of the website http://netzfeuilleton.de/. He mentioned that he wanted to engage us into becoming our own media mogul, by starting to be active in online media. Various successful examples on online media were shown to us - bloggers, authors, YouTube-ers and so on. The Participants have also discussed the question of how they envision the media landscape of the future.

The Baroque city Fulda

That was the writer's second time coming to Fulda - the first one was in January 2009, when the writer went there as a lone wolf. Nothing much has changed since the last time. Prof. Khakzar, who the writer has mentioned above, told us that Fulda has the reputation of being the cleanest city in Hesse. It does not have much attractions for students - i.e. students find this city not so entertaining at nights, hence the weekend life of students here are relatively quiet. This, as Prof. Khakzar has alleged, is contributing to the high rate of students graduating from Fulda. The writer personally would agree with that, since Fulda is located so far away from other major cities in Hesse - 2 hours of train journey from Frankfurt alone to get there.

Nevertheless, some of the participants attending the seminar, went out during the second night in Fulda. They searched for any student-friendly place to have drinks and they have managed to spot a cosy shisha bar. The writer can't recall the price, but the writer would say it was so affordable that one could order one shisha just for oneself alone.

The conduct/behaviour of the students

Some students were found to be very articulate - actively asking questions and expressing opinions, accompanying their points with examples from their respective home countries. However a few of the participants could also be considered as rude, impolite and irritating because they talked to each other during the lectures, half as loud as the voice of the presenter in the approximately 50 m² room.

Apart from that, a few students also were found to be unfocused or diverted from the main objectives of this seminar. Some were even expressing disappointment that current political issues e.g. Arab Spring were not brought into discussion - as they thought this was the purpose of this seminar. As the writer thought this critic was unnecessary and unfair to the organizer, The writer pointed out that they have been not reading the clear descriptions of this seminar on its brochure, which was already distributed much earlier.

During the second / last night in the youth hostel, some students who were staying (not going to the shisha bar), used the seminar room as a place to put on some loud music and dance. They were having fun until one 40-year-old-plus man, who happened to be another guest the hostel, came to them and gave a threat, telling them to stop partying or he'll complain tomorrow to the hostel admin, saying that this would be their last time to come here. That was very ironic, since this hostel was supposed to be a youth hostel.

Summary

This seminar can be considered as successful in achieving its objectives. Participants were exposed on the availability of social media as a very useful tool in promoting their causes - be it political or anything else. Participants generally found the conducting of the seminar in English very favorable. The seminar has motivated the writer to be more active in using social media, hence by being active again in writing on this blogspot. The venue - a youth hostel in Fulda - it was a good place to hold a instructive events such as this, but located very far from the central  part of Fulda.

Thursday, November 15, 2012

Easy Curve Fitting with MATLAB



Basically this exercise is about an easy and common curve fitting, which is used on a set of raw data points. The book 'Mathematische Formelsammlung' by Lothar Papula was referred for this exercise and its particular chapter is 'Ausgleichs- oder Regressionsparabel'.

Your mission, should you choose to accept it, is to fit a parabolic curve of the form y(x) = a*x^2 + b*x + c, to the given set of raw data points.

At the end of this post, I've included the link to download the M-script file.

Raw data
x = [-3:1:5]';
y = [-3.94 -1.47 -4.66 -3.21 0.84 7.24 15.58 27.94 42.59]';
[n,m] = size(x);
Calculation
The curve parameter a, b and c can be determined from the method of least squares (German- Methode der kleinsten Quadrate), which uses linear equation system with 3 equations and 3 unknowns.

x4 = x.^4;
x3 = x.^3;
x2 = x.^2;

sx4 = sum(x4);
sx3 = sum(x3);
sx2 = sum(x2);

sx = sum(x);
sy = sum(y);

x2y = x2.*y;
xy = x.*y;
sx2y = sum(x2y);
sxy = sum(xy);
Formation of the known matrices
The targetted matrix equation is as follows: A*K = vekb. Out of those 3 matrices, A and vekb are known.


A = [sx4 sx3 sx2;...
    sx3 sx2 sx;...
    sx2 sx n];

vekb = [sx2y; sxy; sy];
Determination of the curve parameter
The matrix K consists of the parameters - a, b and c, that we sought after. Simply multiply the inverse of A and vekb, both gained from the previous step.
K = inv(A)*vekb;
Generation of new data points
By using the gained parameters in K, new points can now be plotted.


yneu = K(1)*x.*x + K(2)*x + K(3);

Plotting

The displaying of the result.

M-Script code:
MV_Blatt_1_Aufgb5.m
p/s: just in case that you're not using MATLAB or Octave, that file can also be viewed in normal text editor =P