Archive

Archive for the ‘programming’ Category

My old project – Crash3D graphic engine

April 28, 2011 Leave a comment

Today I found one of my really old pojects. It’s 3D graphic engine that I wanted to use during development of my games. I’ve never finished it. I even don’t want to look into the source code any more, because I remember that it was horrible. I was learning C++ back then. First I was writing a code and then thinking about design, and of course no tests at all instead of manual ones (today I have totally different philosophy).

Read more…

Advertisements
Categories: programming Tags: ,

Extending EGOTableViewPullRefresh Project

March 10, 2011 2 comments

During my work on my first “semi-pro” iPhone application, I wanted to find good and easy way for refreshing data in table view. I found EGOTableViewPullRefresh project, that is used i.e. in Facebook application for iPhone. This is that text and arrow at the very top that downloads new content if you pull down the view during browsing news feeds.

I wanted to have such functionality in the bottom of my view for downloading older posts (Facebook application solution is simple cell, which after tapping triggers downloading older feeds). This project however supports header only. I extended it to make it possible for placing this “pull to refresh” object in the footer, at the very end. My forked project with this change you can find here: zbyhoo/EGOTableViewPullRefresh

I hope that authors will accept or maybe will be inspired by my modification and pull request.

Categories: iphone, programming Tags: , ,

Learning Ruby with Ruby Koans

February 2, 2011 1 comment

Some time ago I was learning Ruby using online tutorials or references. It was pretty smooth but I think that it was because of ruby language itself. Two days ago I started learning it all over again and it’s fun as hell because of Ruby Koans.

There is no introduction or something you have to read. Just run it and you will see failing tests. You need to fix them to be able to move to next sections and see your progress bar moving towards the enlightenment… Try it, and you will be willing to fix following tests as soon as possible, its really addictive.

Update:

Uff.., I finally did it. It is really addictive and I’m happy it’s over and I can work on my other projects. Below is the final screen proving completion of the whole tutorial.

Categories: courses, programming Tags: , ,

Converting gcc output to msvc one

January 10, 2011 2 comments

Some time ago I was using Microsoft Visual Studio IDE to compile project with MinGW. Everything was fine except the output of the gcc. When some error or warning was printed to the output console, I was unable to go to source code line with mentioned error/warning by simply clicking it in the output console window.

I created simple ruby script converting gcc errors/warnings output lines into Visual’s compatible one.

The script can be found here.

Usage and sample output you can see in the below screen shot.

Categories: programming, windows Tags: , ,

UML Diagrams with yUML

December 23, 2010 Leave a comment

Today I found pretty nice looking free online wep page for creating UML diagrams. It is yuml.me.

It’s pretty useful for small projects, with small amount of calasses and relationships. It’s fast, because you just specify all data in the url. After couple of tries I was able to create more complicated diagrams. You can find user guide here.

Here is one of my diagrams.

For more diagrams you see my ObjC_Patterns_Kata project.

Categories: programming Tags: ,

Projects Page Launched

December 11, 2010 Leave a comment

Today I created new page on this blog called “projects“. You can see there my current projects that I’m working on and completed ones. This is probably only for IT projects, but who know…

Categories: programming

Git(Hub) and Mac Line Endings

December 8, 2010 1 comment

During my first project created in X-Code which I wanted to store in public GitHub repository I encountered issue with showing content of my source files on GitHub web page. After contacting with GitHub support (btw, they answer really fast and are helpful) they pointed out my line endings.

Quick recon brought surpassing results. I realized that even modifying single line of code in the source file, git shows modification in the whole file, because it sees this file as a single line (Mac line endings was shown as ^M). Why I didn’t noticed it earlier? Don’t know. I’m a noobie on Mac.

The first solution for GitHub web page was to set following git config attribute:

git config --global core.autocrlf input

It should commit files with Unix line endings. I know it works in Windows, but somehow it hadn’t worked for me on my Mac. Creating new project from scratch didn’t help either and even if it would help for files committed to the repository, my local git problem is still not resolved.

The solution was to set in X-Code configuration (Command + “,”) line ending for new and existing files to Unix (LF) instead of Mac (CR):

It solved issues with newly created files, but old ones was still invalid (maybe someone will explain me how this “For existing files” option works). Following command executed on all current files, which simple swaps line endings, solved the issue:

tr '\r' '\n' < <old_file> > <new_file>
Categories: programming Tags: ,