Sunday, August 31, 2008

Back to UVA

I decided to give UVA online judge problem 103 (Stacking boxes) another try. I’ve tried it several times earlier, but couldn’t get it perfect. However, I spent some time in the summer learning and coding in Erlang. Which is a functional language. Which means lots of recursion. I wanted to understand recursion a bit better anyway. The point is: with my new experience, I actually managed to solve teh evil problem. I might just get back to UVA. Also, C++ seems a lot friendlier now that I actually wrote something non-trivial in it.

Thursday, August 28, 2008

Moved... there and back

I recently tried out two other free bloghosting sites. The first was freedrupal5hosting.com. Not bad, but Drupal itself has features I don't need, and the ones I do need are somewhat difficult to find. Next up was a free Wordpress blog at blogetery. This does have some nice features, being based on WP, but I find it somewhat limiting: no JS, no CSS, hell, sometimes not even HTML.
Bottom line is: I'm back to Blogspot, and for good, it seems.
There's one thing I miss here, which is static pages - but I can do that with a normal post and a link, so no love lost.

Saturday, August 9, 2008

Projektek (Magyarul)

Utolsó frissítés: 2009. Április 27.
Megjegyzés: Kicsit hosszú lett az oldal, ezért a leírások alapértelmezésben rejtve vannak. Katt a címre, és lenyílik.

Itt szerepelnek a projektek, amiken dolgoztam.

Szabadidős

Amiket magamnak, szórakozásból írtam, vagy mikor valami újat tanultam.

RPN Számológép
GitHub repo
Egy fordított lengyel jelölést használó Java számológép. A szövegmezőket a GUI gombjaival vagy billentyűzettel is lehet módosítani. Vannak exponenciális és trigonometrikus függvények. A szövek fokban és radiánban is megadhatók. A veremben öt, a memóriában 4 szám tárolható. A műveletek implementációja "higher order" (magasabb fokú?) függvényeket használ.
Form készítő
GitHub repo
Egy interaktív, táblázatokra épülő form-tervező JavaScriptben, a JQuery frameworkkel. Támogat fordításokat, jelenleg angol és magyar fordítása van. 2009. március 24-n a táblázatok kezelése működik, és a sima szöveges, illetve a text, button, checkbox és radio típusú input elemek működnek. Csak Firefoxszal van tesztelve.
AbDict szótár nyelvtanuláshoz
Link: SourceForge oldal
Jelenlegi verzió: 0.2
Az első komoly Python alkalmazásom. Egy tipikus szótár-írós-szó-tanulós program. A felhasználói felület lefordítható, jelenleg angolul és magyarul tud. Az első verzió megvalósítása csúnya volt, így szereztem egy kis tapasztalatot Python kód átalakításában is.
CryptChat titkosított chat
Letöltés
Sajnos az abesto.extra.hu tárhelyet az extra.hu letiltotta, valószínűleg mivel 'kikapcsoltam' a kötelező extra.hu-s menüt... Úgyhogy ez a project gyakorlatilag elveszett. A leírás azért itt marad az utókor számára :)
Egy egyszerű chat kliens Pythonban, a Twisted frameworkkel. Saját XOR titkosítást használ a felhasználó által megadott jelszóval. A kliensek közvetlenül kapcsolódnak egymáshoz, és a kliensek az üzeneteket az összes többinek maguk küldik el (P2P-szerűen). A szerver egy egyszerű PHP szkript, ami sima szövegfájlban tárolja az aktuális kapcsolatokat. Csak a Win32-re lefordított programot töltöttem fel, természetesen a forrást (a klienst és a szervert is) el tudom küldeni kérésre.
Irina könyvkatalógus
Launchpad oldal
Jelenlegi verzió: 0.2
Egy könyvkatalógus, szintén Pythonban. Csak magyarul tud, de le lehetne fordítani más nyelvekre is. A könyvek információit ISBN alapján le tudja tölteni az antikvarium.huról. Itt főleg magyar nyelvű, régebbi könyvek vannak, az 500-egynéhány tesztelésre használt könyv kb. 90-95%-át megtaláltam ezen az oldalon. A könyveket kategóriákba lehet rendezni, illetve a kategóriákat és a könyveket is lehet 'áthúzni' (drag-and-drop). A Win32-es telepítő hozzárendeli a katalógus-fájlokat az alkalmazáshoz.
abesto.extra.hu
Link: abesto.extra.hu
Az abesto.extra.hu tárhelyet az extra.hu letiltotta, valószínűleg azért, mert a kötelező extra.hu-s menüt 'kikapcsoltam'... Várható volt. Ez van :)
Az első weboldal próbálkozásom. Sima HTML, CSS és PHP van benne, frameworkök nélkül. Van itt egy tetszőleges mélységű PHP-s menü, magyar és angol kétnyelvű oldalak, Javascriptes sudoku-fejtő és még pár érdekes dolog.
Indiszkrét Kérdés (osztályunk honlapja)
Link: http://indiszkret.110mb.com
Az osztályunk honlapja. Csak magyarul tud. A grafikát egy nagyon tehetséges osztálytársam készítette. Eredetileg sima PHP-ben írtam, de nemrég ráültettem a Symfony PHP frameworkre. Néhány érdekesség: mozgó hírek sáv (jó, ez nem is érdekes...); egy PHP-s naptár JS/Ajax órarenddel (nyári szünetben letiltva), egynapos eseményekkel, hónapokon/éveken helyesen átnyúló szünetekkel és természetesen esemény-listával. Sokat dolgoztam a saját kép-böngészőn is.

Munkák

Projektek, amiket megrendelésre készítettem. Lehet akár referenciáknak is nevezni őket.

All in One Discount
Látogatás
Egy ZenCart-alapú webshop, amit a megrendelő szükségletei szerint módosítottam. Jeleneg magyar nyelvű, tervben van a német nyelvű fordítás is. A design és tartalom minősége... hát azért nem vállalok felelősséget.
A banner rendszert használjuk a kiemelt hotelek képeinek bemutatására az oldalsó dobozokban. Az aukción levő hotelek alá három gomb került (Képek, Virtuális séta, Közeli látnivalók), amik AJAX-al töltik be a tartalmat.
NDA Metaman Firefox kiegészítő port Firefox 3-ra
A kiegészítő weboldala
Egy kiegészítő, aminek a segítségével az NDA (Nemzeti Digitális Adattár) adatbázisán keresztül kommentálhatunk egész weboldalakat, vagy weboldalak egy-egy részét.
A projekt során Javascript és CSS kódot alakítottam át és egészítettem ki. A Firefox 3-ban eltávolított SOAP támogatást a jqSOAPClienttel helyettesítettem. Az automatikus frissítés az új verziókkal működik, de az elsőnél kézi letöltésre van szükség.

Projects (In English)

Last updated: 24. March 2009.
Note: The list got quite long, so the descriptions are hidden by default. Just click on a name to unfold it.

Below you can find a list of projects I've worked on.

Private

Things I wrote mostly for myself, or for fun, or while learning something new. Their quality varies, but they're mostly functional.

RPN Calculator
GitHub repository
An RPN calculator written in Java. The text fields can be edited via the GUI buttons or the keyboard. It has exponential and trigonometric functions. You can choose angles to be represented as degrees (Fok) or radians (Radián). The stack has five slots (X, Y, A, B, C) and four memory slots. Operations are implemented with higher-order functions.
Form builder
GitHub repository
An interactive table-based form builder written in JavaScript, with the JQuery framework. It supports multiple languages, English and Hungarian right now. As of 24. March 2009, all the table operations are done, text-content cells and text, button, radio and checkbox input fields are supported. Only tested with Firefox.
AbDict students dictionary
SourceForge page
Current version: 0.2
My first serious Python application. It's one of those write-dictionary-test-words programs. The interface can be translated, now it has English and Hungarian languages. The first version was quite hackish, so afterwards I also got some experience in refactoring Python code.
CryptChat
Download
Note: abesto.extra.hu was taken offline by the provider, most likely for removing the mandatory ad/menu... So this one is lost. Sorry. The description stays here for the record:
A simple chat client written in Python with the Twisted framework. It uses a hand-made XOR encryption with user-given passwords when transmitting messages. The clients connect directly to each other, and messages are sent to each one (kinda P2P thing). The server is a simple PHP script (available on request :D) that keeps track of connections in a flat text file. I uploaded only the compiled Win32 binaries, but of course the source is available on request.
Irina book catalog
Launchpad page
Current version: 0.2
A book catalog, also written in Python. Only available in Hungarian, but of course it could be translated. Fetches book information from antikvarium.hu by ISBN, where it found info for about 90-95% of the 500-odd books I added. Supports book categories, drag-and-drop for both the categories and the books, and file-type association in the Win32 installer.
abesto.extra.hu
Link: abesto.extra.hu
Note: abesto.extra.hu was taken offline by the provider, most likely for removing the mandatory ad/menu. It was to be expected... sorry.
My first attempt at website building. Written in plain old HTML, CSS and PHP, without any frameworks. Features an unlimited-depth PHP-generated menu, English and Hungarian languages, a Javascript sudoku solver and some other fun things.
School class homepage
Link: Indiszkrét Kérdés
The website of my class at school. It has only Hungarian language. The graphics were made by a very talented classmate of mine. I wrote it originally in pure PHP, but ported it some time ago to the Symphony framework. Some highlights are the moving news on top (OK, not a highlight...) and the calendar written in PHP, complete with JS/Ajax timetable (disabled in the holidays), one-day events, holidays correctly spanning through months and years and of course an event list (see 'Naptár' section). A lot of work also went into the custom image browser (see 'Képek' section).

Work

Projects I completed on order. You could call these my portfolio.

All in One Discount
Visit it
A ZenCart-based webshop I customized to the needs of the user. Currently in Hungarian, German translation planned. As for the quality of the design and the content... I take no responsibility for that.
The banner system is used for showcasing hotels in the sideboxes. Three buttons (Képek - images, Virtuális séta - Virtual walk, Közeli látnivalók - Nearby sights) were added to the hotels on auction that load their content with AJAX.
NDA Metaman Firefox extension port to Firefox 3
Extension site
An extension for annotating and commenting on web pages via the NDA (National Digital Datastore) database.
This project involved refactoring and extending Javascript and CSS code. The removed SOAP support of Firefox 3 was worked around with jqSOAPClient. Auto-update works with newer versions, though the first update required manual download.

Thursday, August 7, 2008

spawn(learn, prog_lang, [erlang])

I recently came across Project Euler looking for some problems. I found them alright, and something else: some rather bright people used a strange beast called 'Erlang' to solve the problems. OK, it's not so strange, having been around for 20-odd years, but this is the time I decided to give it a go.

Thinking In Erlang is a tremendous help. With it safely downloaded I solved the first two Project Euler problems an hour after my initial decision to get started in Erlang. Solved them, yes... Fully understood how the solutions work? No, not quite.

Functional programming?

Erlang is a functional programming language. Wikipedia can explain the concept better than me. What this means in practice is that, having written procedural and OO programs for the last... why, 5-7 years, I have to bend my mind a whole new way to be efficient with Erlang. I can almost hear the gears clicking and cracking in my head in a very new direction. It's like learning not just a new language, but a range of new letters, grammar patterns and generally a new way of thinking.

Also, Erlang is focused on concurrent programming. I didn't yet get into that part, but it can easily be seen how a functional programming is very powerful when coupled with concurrency. With multi-core CPU-s coming out (not to mention several hyper-threads for each), this definitely looks like the way to go.

Tuesday, August 5, 2008

XeLaTeX notes

I've run across TeX & friends a few times, and I decided it was time to get up close and personal. First surprise: the 'X' in TeX is pronounced like the 'ch' in German. Well... ok, why not. Anyway, I love the structure of the whole TeX system: it's completely modular and loads only what you need. Hard part is figuring out just what you need. Especially when you want funky characters like é, á and ß. Another thing is to set the pdf2latex executable to XeLaTeX in whatever GUI using. Yeah, that should only be natural, but it wasn't for me (at first), so who knows.

So. I copy-pasted some stuff from 'round the net, and here's the result, a basic document skeleton with everything I need in a general document:
\documentclass[12pt,a4paper]{article} %says it all 
 
\usepackage[hungarian]{babel} %Hungarian hyphenation 
\usepackage[latin2]{inputenc} %tells *TeX to handle the file as latin-2 encoded, for Windows editors 
\usepackage{graphicx} %To import images 
 
%Cool headers/footers 
\usepackage{fancyhdr} 
\pagestyle{fancyplain} 
\fancyhf{}  
\lhead{\fancyplain{}{Some Title}} 
\rhead{\fancyplain{}{- \thepage -}} 
 
\sloppy %Prefer looser spacing to overlong lines 
 
%Use system fonts 
%I prefer the TeX fonts to everything I've looked at so far 
%\usepackage{fontspec} 
%\setmainfont{Times New Roman} 
 
%For all the funky characters 
\usepackage{xunicode} 
\usepackage{xltxtra} 
 
%Make \emph both italic and bold 
\renewcommand{\emph}[1]{\textbf{\textit{#1}}} 
 
%Just some example margins... I find the defaults way to big 
\usepackage[left=2.5cm,right=1.5cm,vmargin=3.5cm]{geometry}