Entries tagged as university
Monday, April 2. 2007
I don't know which is the most common way to calculate Pi in computer programs, but from the stochastics book a read for my recent stochastics exam, I have a randomized variation, which is quite cool I think. To show it, I implemented it in PHP:
$precision = pow( 10, (int ) ini_get( "precision" ) - 5 ); $hits = 0; for ( $i = 0; $i < ITERATIONS; $i++ ) { $x = mt_rand( 0, 2 * $precision ) / $precision - 1; $y = mt_rand( 0, 2 * $precision ) / $precision - 1; if ( ( $x * $x ) + ( $y * $y ) < 1 ) { $hits++; } } echo "Pi is about " . ( ( 4 * $hits ) / ITERATIONS );
The basic assumption in this algorith is, that the generated coordinates are rectangular distributed in the rect (-1/-1) - (1,1). For the numbers I generate using mt_rand() this should be almost correct (note that the generation is not part of the algorith itself, it only says, that you need rectengular distributed points). For each of this generated points, a check is performed, if the point is located inside the unit circle. If it is, a hit is recorded. The relative frequence for this event is exactly the ratio between the unit circle and the whole square, which means it is Pi/4.
The algorith is not really fast, but gives usable results for a large number of iterations:
| Iterations |
Pi estimation |
Time (sec.) |
| 100 |
3.2 |
0.000174045562744 |
| 1000 |
3.128 |
0.00145411491394 |
| 10000 |
3.1436 |
0.0180418491364 |
| 100000 |
3.13876 |
0.16107583046 |
| 1000000 |
3.143652 |
1.64533686638 |
| 10000000 |
3.1423896 |
18.0556662083 |
Update, 2007-04-02: Note, that you should never use this algorithm to calculate Pi in PHP! There is the predefined constant M_PI, as well as the function pi() to retrieve a value with the precision specified in your php.ini! This is just a cool algorith and it's really slow (in comparison of using the constant)!
Monday, September 18. 2006
It's been a good month, since the PHP Usergroup Dortmund asked for feedback on the idea of a PHP introduction workshop in Dortmund. Because of the huge masses of interessted people, we expanded the idea and are now going to make a 2 day, 2 track PHP introduction weekend, including 2 workshops and a lot of interessting sessions about topics like "XML handling", "Enterprise PHP", "SOA" and "Shell scripting.
Since the event is in German Language, I'm posting the German announcement here.
PHP Usergroup Dortmund proudly presents: The PHP Weekender!
Gut einen Monat nach der ersten Umfrage auf der Informatik-Mailingliste der
Uni-Dortmund, ob Interesse an einem PHP-Einsteiger-Workshop bestehe, ist es
soweit: Der PHP Weekender erblickt offiziell das Licht der Welt. An 2 Tagen
haben PHP-Einsteiger und -Fortgeschrittene die Möglichkeit, ihre
PHP-Kenntnisse auszubauen. In 2 parallel laufenden Tracks werden erfahrene
PHP-Spezialisten ihr Wissen in praxisnahen Vorträgen und Workshops zur
Verfügung stellen.
Facts
Wann: 7./8.10.2006
Wo: Universität Dortmund
Fachbereich Informatik
Otto-Hahn-Str. 14
44227 Dortmund
Raum E04 and E23
Wer: Alle PHP-Interessenten
Kosten: NIX!
Infos: http://weekender.phpugdo.de
Sessions
Neben einem reinen Einsteiger-Track, der jeweils aus einem seminar-ähnlichen
Vortrag und nachmittags aus einem praktischen Workshop besteht, werden an
beiden Nachmittagen parallel Einzelvorträge zu Themen wie "XML Handling",
"Enterprise PHP", "SOA" und "PHP auf der Shell" stattfinden.
Abgerundet wird die Veranstalltung am Samstag mit einem Social-Event zur
Entspannung und einer kleinen Keysigning-Party am Sonntag.
Anmeldung
Zur besseren Planung bitten wir alle Teilnehmer, sich vorher verbindlich auf
unserer Website (http://weekender.phpugdo.de) anzumelden. Es wäre doch schade,
wenn der ganze Haufen Vorträge vorbereitet wird und nur 3 Leute dafür
erscheinen.
In der Hoffnung auf zahlreiche Teilname,
Eure PHP Usergroup Dortmund.
i.A. Tobias Schlitt
Wednesday, March 23. 2005
Over the last weekend, I completly refurbished my ne appartment in Dortmund and on upcoming Saturday I will move there. I'm pretty much looking forward to that. Because of the bunch of preperations to do, I will not have that much time for open source stuff until April 8th.
Does anyone need a skilled PHP developer near Dortmund as a part time job? Please email me!
Wednesday, November 17. 2004
How "Dr. Scheme" is scared, when it's main window has been closed...
Wednesday, October 13. 2004
It's true, since monday I'm a real student. Although the winter term has not officially started, yet, I have the so called O-Phase (orientation phase) this week, which helps new students to find the right way. Today is the 3rd day of my student life and I have to admit, I like it. There are so many geek people all around me, thats definitly fun.
I will write some more on my new life at university when I'm fully back online... Hoping that this is not too far in the future...
Sunday, April 4. 2004
This is the main question, but that's more or less clear by now.
As some of you might know, I finished my apprenticeship to an IT Specialist (german: Fachinformatiker) at Deutsche Bank AG in Frankfurt (Eschborn) last year and I'm now eployed there as a Software Architect there. I'm currently working for the eBranch project, which migrates our current, decentralized branch infrastructure (about 20,000 employees in about 7,000 branches germany wide) to a new centralized one. The old one was based on OS/2 and we are now building up a Windows2000/2003 Terminal Server farm which will be accessed by the users through thin clients.
Pretty interessting, indeed, but I'm missing the deep knowledge in some parts of computer science in my life and therefor more or less decided to go and study. This decision is not really fixed, yet, but for about 95% now. I prefer to study at TU (technical university) Darmstadt (2nd best in germany for computer science), because my girlfriend is studying there and it's not far away to move from my current location.
The jumping point now is the field to study which I have to choose. Personally I would be more interessted in studying real, pure computer science (Informatik), but most people tell me, that job chances are much better in business computer science (Wirtschaftsinformatik). Business computer science is based on computer science, but has addintional parts of business administration and economics and therefor leaves out some parts of real computer science.
As told before, I'm much more interessted in the pure IT part of the studies, but I guess, that business computer science would raise my job opportunities later. A predicament which I will have to solve until July this year, where I have to choose finally, which way tlo go...
Maybe some of you can give me a hint (from their studies?) on which way to go and what to do. I would be greatful to get some comments on this blog entry.
|