It is all about me!
you have nothign to prove, except theorems


 
Soundtrack:

It is all about the soundtrack in your life.
The one that plays while you act on life's stage.
Po wered by WordPress

-->

August 31, 2008

Django love

Filed under: alexHS, Django — ivan @ 7:22 pm

So the coding is going well these days. It better be since the deadline is in…. hmm… less then 48 hours :)

Django is an amazing framework. I am amazed with all the features that are built-in and most importantly all the features that HAVEN’T been included.

I don’t buy the whole MVT propaganda (at least I find myself coding so much stuff in the V that I feel there must be a better way to do things. Maybe some more things can be abstracted away? (For example how come I have to manually check request.POST and request.GET and do the page logic with if else statements? )

As it stands though, the tools are there to make the web developer’s life very pleasant. Instead of getting results from the database you “get” them from their class like Examples.objects.get(id=3) which in turn translates to a SELECT * from examples_example WHERE id=3;. It gets better than this, especially with complex relationships, backlinks and searching. I’d say the model part is BEAUTIFUL.

The templating language, for which I had reservations originally turns out to be very usable and user friendly. I would suggest you read through (or print) the documentation so you know what is available. There are all the basic tags you would expect but also some really neat ones that save you a lot of time. Everything is well thought out (a little confusing about when to use {% tag %} and {{ tag }}, but you get used to the syntax after like…. 15 minutes :).

One of the design cornerstones is the template inheritance system. The logic is that every template should define blocks in itself to be replaced by more specific code and also inherit the look and feel from some more general template if appropriate.

For example, if you have an book catalog website you could have the following templates.
base.html (defines the header, and general page strucutre)
profile.html (a user profile page)
profile_settings.html (some specific block of code on the profile page)

In general, if you find yourself typing something more than once you (violating DRY) you should abstract it away into a parent template and make your two pages inherit from it.
The only thing I am still not decided upon is where is the juste-milieu between {% extends … %} in a child and the {% include … %} from a parent approaches. I use both of them.

I just found a really neat way to do breadcrumbs in a django site. It is so beautiful! I had been writing my own routine for this, but I figured there must be a simpler way to do things.
What could be simpler than 0 lines of code ?


August 24, 2008

Work, work and mo work

Filed under: Python, alexHS — ivan @ 3:55 pm

I have been working on the alexhs project almost non-stop for the past …. long time. Like wake up, code, lunch, code, code, beer, code, sleep, wake up (loop …).
Putting in all the hours does have an effect: the website is moving forward every day with new content types, views and css coming together. The Sept 1st deadline doesn’t seem so unrealistic now — at least if I keep going like this.

Is this what I want to do with the last remaining week of my summer though? And are these efforts going to be appreciated by anyone. How do I want to be appreciated — with stock? With cash? With words?

The stock is an exciting option but P. will want to get me to commit “heavily” to the project — basically to have me around for odd jobs throughout the year. To fix this and that and add new features. And he doesn’t seem to want to give me stock as incentive — rather he sees it as replacement for pay. So if I work for $4000 worth of hours he will give me some part of the company which other investors normally pay $5000. Wow… 20% off!!! Great deal! So I have the option of having $4000 hard earned cash OR put this money into a company with uncertain future and an inexperienced web development team make up of Bulgarian immigrants !

So I think I should get cash right now. The only problem is we sort of already sort of said that I was more interested in stock… Can-I can go back on my decision now? Nothing has been signed yet — why not?

It will be an interesting talk tonight.

As far as development goes, I am starting to be good at Django. The framework allows me to do pretty much all the simple things easily and doesn’t stand in my way when trying to do fancy stuff. I would recommend it highly to anyone who is interested in web programming.

Ok, enough brake — go back to that code…


August 18, 2008

A dream

Filed under: Thoughts, Graduate Life — ivan @ 11:31 pm

I just remembered I had a very cool cream this morning. I will try to collect the pieces left over in my memory for you, my dear readers.

{% block dream %}
There was a storm coming and I remember thinking about taking cover… what would be the best place to go to be aerodynamically concealed? Then I remember a gust of find hitting me so hard that I fly several meters … in fact I am flying all over the place but I just happen to pass by some sort of railing which I grab onto.

I remember thinking that I should not try to stay static on that place and I allow myself to slide on it (it appears to be circular — like some sort of orbit around a building). So the wind is now pushing me around but I am not totally blown away. A thought that occurred to me while in the middle of this “storm” was how it would be nice to be able to harness all the power that exists in mother nature. What was Tesla up to with all this “earth atmosphere as a capacitor” idea? Wind turbines seem so inefficient. There has got to be some electric thing going on we can just tap into….
Eventually calmness arrives… or at least I start to fear less since I am safe attached to the rail.

Then the crazy things start to happen. I realize that this whole thing is not a storm, but rather the air disturbances caused by some advanced hovercraft technology. I see this spacecraft coming in over my head and it isn’t threatening or anything … just a lot of wind.

I remember thinking to myself — of course, that is what all those storms are — not natural occurrences but the effects of advanced airship operation. It seemed very logical to me at the time — think of the wind and noise you experience when close to a hovering helicopter…. now imagine some other technology for more powerful airships? Wouldn’t it feel like a storm? Certainly my brain thinks so :)

The next association was that whomever is flying these things has a lot of business in the southern states and in the Caribbean…. where the big storms happen.

And then from the airship a pair of glasses drops. They have dark rims and are very oval — like some sort of clean modern design of sunglasses. They also have a multicolored lens of some sort. Very shiny lens — almost light emitting. I feel like whoever dropped this on me is saying: “here man, you’ve been a good guy and we give you now something so you can see better and fight the system more effectively.”
Instead of putting the glasses on, I tuck them away in my pocket. As if I want to save them for later. STUPID!!! If and advanced flying spacecraft gives you something you should use it right away. Otherwise you run the risk of waking up and not knowing what you would have seen ….

{% endblock dream %}


August 10, 2008

Unix player

Filed under: Linux, Girls — ivan @ 11:23 pm

When girl1 invites you to go to tam-tams on a specific date
how do you know if you should say yes or no when it could
conflict with a visit to the tam-tams with girl2

The regular run-of-the mill player will probably be baffled by
such a complex calculation. Not the unix player.

ivan$ cal
    August 2009
Su Mo Tu We Th Fr Sa
                   1
 2  3  4  5  6  7  8
 9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31

Filed under: Computers, Business — ivan @ 2:31 am

In the business news section today:
useme wireless network sharing consists of 3 components (some of, which we sell parts for)

  1. freeloader client: a wifi client connected to a public wireless base station
  2. link node: a dual wireless interface machine. Clients connect to it on one interface and the machine bridges the IP to benefactors on the other interface.

    • low power consumption box (like a P3 laptop)
    • two PCMCIA cards with antenna extension if possible
    • everything standard 802.11g and 802.11b no new fancy stuff
    • housed at a volunteer’s house who is told: “You have been chosen because you are the house at the highest point and you sould do this service to you community which only has a marginal cost of ~3$/year on your power bill. Also, in a profit sharing theme we offer you a 600×40 strip of banner space on the landing page of the login page which people go to for info.”
    • automated connections’s script (like a router table but a robot) which also manages transmit and receive power
  3. benefactor: a Bell client with unlimited DSL that doesn’t mind if some freeloaders use his connection for a bit — but wants their traffic to be sort of “managed” in some way (prioritize you connections, limit donated bandwidth, improve bittorrent packet handling, usage report statistics per MAC)

Protocol:
benefactor easy step: you put your wireless router in a good spot and set it to a hidded ESSID named “useme”
You will not get a mass of users because most people don’t know how to connect to a hidden network
certainly if you are clicking somethign with a mouse …. it won’t be easy enough for average joe to pull off
The link nodes however… they are programmed to scan for “useme” named access points and use them for upstream
You can limit traffic on your router by MAC to allow only traffic from blessed “link nodes”

Benefits:
In any given airwave space — think of the space between two cliffs in a small valley town — there only needs to be ONE or FIVE wireless link nodes to handle all the traffic. This contrasted with the growing trend of “everyone with a wireless router at home cooking their brains with it for “last 10 meter” connectivity.
Solving the last mile problem in a way contains the “last 10 meter problem” as a subproblem.
And I think we need a solution because of health factors, and also to decouple the dependence of the user on any one ISP. (My friend Juan was telling me the other day how certain parts of the web didn’t exist for him thanks to Sympatico’s failing DNS)

Optional module that “plugs in” nicely:
storage node: an open sourced file server with samba, apache and a tracker + a bunch of bt clients that seed files according to need.

  • webmin or freenas or (ivaNAS ??? need to get hot russian programmer chick as spokesperson)
  • automated mapping of ordinary torrent files AND a “packaging” of filesystem parts (like a Folder or a playlist) into single easy to get chunks.
  • automated replication between neighbouring file servers for work offloading
  • one wireless interface to connect to link nodes:
  • packaging of files into file-system independent “archives” that can be burned onto CDs DVDs, put on flash disks, written to 500G USB hard disk formatted as fat32. (basically a thin metadata layer which allows a standardization of things like access times, symlinks, and full text indexes of contained data

¢£$¥:
How does this makes money? Classy advertisement?
Hey write the code first and then we’ll see… (hey what about a script that automaticall hacks WEP access points and uses them at low traffic to avoid detection…. collaborative computing with evangelization the Bulgarian way…. )

on a sidenote: Is it a crime to copy word-press look-and-feel ?
It is a pretty much standard thing these days.
Anyone who can install PHP stuff and all the disilusioned blogger users have now word press for their blog.
I could put in the d)ango buzzword here to make people come to my blog :)
Better start a different blog first. I wouldn’t want my past to be so publicly available….

on a second sidenote: Check out the power of sqlite3: it is right under your address bar.


August 3, 2008

Money as debt

Filed under: Uncategorized — ivan @ 12:53 pm

First a quote for you:

Money is a new form of slavery, and distinguishable from the old simply by the fact that it is impersonal—that there is no human relationship between master and slave.
— Tolstoy

I got this from a wonderful video about the current monetary system. It is very informative and to-the-point expose on the question that I have always asked: Who prints the moneyz?
I’d be interested to hear what you guys think about this.