Direkt zum Hauptbereich

Posts

Posts mit dem Label "programmieren" werden angezeigt.

VIM as editor of choice

When I started out programming I was using Windows XP and a software named "HTML Editor Phase" or something like it; and later the normal notepad. That was about 12 years ago and the internet changed a lot in that time, so have I. Now I am using linux for about 8 years and tried several options from bluefish, kate, gedit, nano to vim (and some others). When you hear about VIM you always consider it to be geeky or nerdy, and it is in a way because it is different. But as the command line grows on you so does VIM. VIM does run als gVIM on my system and the window management around helps with some features you dont know the shortcut of yet. VIM and the plugin NERDtree are wonderful when editing files, auto completion is as easily intregrated as various color themes (as later I use github). In the picture above you see four different files open, usually I just work with two or three, but sometimes it is awesome to be able to edit them at once and look at the changes...

diagnose! BETA

Two weeks ago a colleague was showing me a diagnosis software which is for free. And as a teacher those things are good to know. Anyway I already was looking for a little project I could use to get acquainted with rails 4 and evaluating checkboxes, so I picked this one up: to do diagnoses. The project is hosted on GitHub and if others want to contribute I will have to get myself into git branches and how to merge them without harming the app. And I will deploy the app as it is to my server: app in production stage . What does it do? There are categories (has_many and belongs_to rails associations) and questions belonging to them. So far the index page will show links to the categories and clicking them will create a page with a random choice questions. These questions are displayed with checkboxes and you can evaluate them by posting you choices and get a result page. It is nothing fancy but still something I can already work with my pupils and on the way I have learned ...

Evaluate checkboxes with params through post action in rails

Lately I was looking to evaluate the parameters from an post action. The background is my questions model with four answers and one column with the a pointer to the right answer. My index.html view looks like this: <%= form_tag do %> <table> <% @questions.each do |question| %> <tr> <td> <%= question.content -%> </td> <td> <%= question.answer1-%> <%= check_box_tag 'question_ids[]', question.id.to_s + '_1' -%> </td> <td> <%= question.answer2-%> <%= check_box_tag 'question_ids[]', question.id.to_s + '_2' -%> </td> <td> <%= question.answer3-%> <%= check_box_tag 'question_ids[]', question.id.to_s + '_3' -%> </td> ...

vim vim vim

Nachdem ich die letzten Tage intensiv programmiert hatte, überdachte ich meine Wahl des Editors unter Linux nochmals: gedit ist ganz nett, gerade wenn es um Snippets geht, also Autovervollständigungen, die man z.B. immer beim Mac mit Textmate sieht. Mich störte dabei aber, dass ich nicht ALLE Dokumente gleichzeitig speichern konnte. Aptana Studio 3 kann dies ganz gut lösen, indem es eine Schaltfläche "save all" gibt. Und auch ansonsten ist der Editor ganz nett, weil ich dabei nicht immer über smartgit an mein git muss, sondern eingebaute git-Funktionen habe, genausogut wie Rails-Befehle wie "rails s" usw. Beide Editoren sind wunderbar für kleine Arbeiten, aber nach den vielen Zeilen Code, die ich kopierte, einfügte, testete usw. nervt es manchmal schon, wenn man die Mouse nebenbei benutzen muss. Ausserdem stürzte mir Aptana ab und an mal ab, und sowas DARF einfach nicht passieren! Auf der Kommandozeile benutze ich immer noch gerne nano , welcher ein wunder...

Agile Web Development...

...with rails. That is the title of a very nice book on ruby on rails. If you are planing on getting to grips with rails web development I highly recommend buying the book. It took me several weeks although I wasnt doing every example, just reading through. Nunja, ab hier darf es dann auch mal wieder deutsch sein. Denn obgleich ich den ganzen Tag (zumindest daheim) englisch rede und ganz intuitiv diesen Beitrag englisch startete, fällt mir das ein oder andere "schneller" ein in deutscher Sprache. Dies ist auch der Grund, weshalb ich mir ein zweites Buch zulegte, um schneller Themen aufsaugen zu können, denn die englische Sprache ist eben nicht "verdrahtet" in meinem Kopf. Ich verstehe englische Literatur, aber sobald es schwieriger wird ist das Deutsche "beeindruckender" für mein Gehirn. So legte ich mir "Ruby on Rails 3.2" von Stefan Wintermeyer zu, welches auch online unter http://ruby-auf-schienen.de/3.2/ zu lesen ist: Wenn...