Lustiges und so

Hier kann über allgemeine Themen diskutiert werden, die sonst in kein Forum passen.
Insbesondere über Szene, Games, Kultur, Weltgeschehen, Persönliches, Recht, Hard- und Software.
Benutzeravatar
Jonathan
Establishment
Beiträge: 2369
Registriert: 04.08.2004, 20:06
Kontaktdaten:

Re: Lustiges und so

Beitrag von Jonathan »

MicrosoftDuBistSoGeil.PNG
Ja, scheiß auf arbeiten, spiel ich halt World of Tanks :D
Lieber dumm fragen, als dumm bleiben!
https://jonathank.de/games/
Benutzeravatar
Jonathan
Establishment
Beiträge: 2369
Registriert: 04.08.2004, 20:06
Kontaktdaten:

Re: Lustiges und so

Beitrag von Jonathan »

Wolfenstein 3D mit absurder Comic-Physik:

http://gamejolt.com/games/super-wolfens ... sics/39194

Wirklich lustiges Spielchen, hat mich 20 Minuten sehr gut unterhalten.
Lieber dumm fragen, als dumm bleiben!
https://jonathank.de/games/
Benutzeravatar
Krishty
Establishment
Beiträge: 8244
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: Lustiges und so

Beitrag von Krishty »

Oh ich lachte hart. Die Mischung aus Minecraft und Ego-Shooter ist der Wahnsinn. Für alle, die zu faul waren, den Link zu öffnen:
Bild
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
kaiserludi
Establishment
Beiträge: 467
Registriert: 18.04.2002, 15:31

Re: Lustiges und so

Beitrag von kaiserludi »

Developer_Dude 2015-10-29 14:49

Until approx. two years ago, the lead dev. (who "left" about that time after 12 years working on this one codebase) pushed the following best practices:

stream of consciousness programming
one big monolithic stream of logic - modularity is for sissies

spread out decision making all over the place
make it hard for a reader to discern the flow of logic
use lots of different variables for the same purpose in making decisions
assign them different values all over the place
special values
null means one thing
empty means another
assigning them other special strings means yet another

never refactor, never surrender
even if a method name has nothing to do with the current logic within, don't change the name of the method or the vars (oh, and BTW, be sure not to change any comments or docs either, never give the maintainer clues to follow).

always add blocks of logic, never make a new method or class - the longer the method the better

don't remove code, comment it out - this makes the code harder to read.

DO Repeat Yourself - but copy/paste is for sissies; copy, paste, then tweak a little.
The more places you have the same logic the better, but it should be at sufficiently different enough that it is harder to refactor - discourage someone from refactoring the code into one place. Make them work for it.

global vars - lots of them, changed and used lots of different places - the farther apart the better.
Even better is if you use them for different purposes - i.e., overloading their meaning.

A State of Madness
Vars store state.
If you really want to confuse someone, have 3 or four vars in the same class with the same name but different scope. Even better, have classes within classes that have this same var name as the outer class, and methods that have a local scope var as the class var. Add on top of that no enforcement of var name practices; i.e., sometimes you have m_varName as a class var, many times you don't. Sometimes a method scope var is named m_varName (possibly because a dev changed it from class scope to method scope and didn't change the name), but all of the time you have this mix of var names.

Now, take all those vars that have the same name, and have them all tracking the same state. You are almost guaranteed that at some point in time one of them is going to be out of synch with the others. Certainly you will confuse any future coder.

Finally, it is often a bad practice to store state like this in a class var. You generally should keep it as local as possible. I.E., if you need to track some state, then keep it within each method. Why? For one thing it is just easier to follow/know who is changing that state, especially if the state can be changed via a public method call. E.G., you have:

public class MyClass
{
public boolean skipFile;

public void processFilesForImport()
{
skipFile = true;
}

public void processFilesForExport()
{
skipFile = false;
}
}

Now, what happens when you have each of those methods called by a different thread? Chaos - right?

To make it even worse, notice that the 'skipFile' var is public so you don't even have to call the method to change it, you can change it directly from outside the file.

Now add on top of that the "State of Madness" where you have a number of different vars throughout this class, all named the same, all tracking the same state!

Enough to drive a dev insane!

type safety is for sissies
pass around strings
use hashmaps of key value pairs - value objects are too easy
flatten out the model - spread it out, harder to understand that way
mix and match

if something can be done simpler, don't do it that way. Very simple example:

Good (more complex):

if (somecondition)
callsomemethod(param, param, param, true, param)
else
callsomemethod(param, param, param, false, param)

Bad (i.e., easier to understand and maintain):

bool value = somecondition
callsomemethod(param, param, param, value, param)

Very Bad (simpler yet):

callsomemethod(param, param, param, somecondition, param)

version control
checkin as many noise files as possible, including old versions as new files with versions in the file names
put different versions in different folders

To pass a list build a comma delimited list and pass that as a string.

These are just some of the "best practices" I had to follow while the previous lead was here. Now I have 15+ years of crufty legacy code to unravel and extend while still adding features and meeting release dates. It will probably take another 15+ years to make this code halfway decent at this rate. The good thing is I retire in 5 years.
Quelle:
http://thedailywtf.com/articles/comment ... evelopment

WOW, 15 Jahre lang hat er das ausgehalten?
Ich hätte an seiner Stelle wohl nicht mal 15min ausgehalten, bis ich gekündigt hätte, wenn ich gezwungen gewesen wäre, mich an diese Best Practices zu halten.
"Mir ist auch klar, dass der Tag, an dem ZFX und Developia zusammengehen werden der selbe Tag sein wird, an dem DirectGL rauskommt."
DirectGL, endlich ist es da
:)

"According to the C++ standard, it's "undefined". That's a technical term that means, in theory, anything can happen: the program can crash, or keep running but generate garbage results, or send Bjarne Stroustrup an e-mail saying how ugly you are and how funny your mother dresses you." :shock:[/size]
Benutzeravatar
Krishty
Establishment
Beiträge: 8244
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: Lustiges und so

Beitrag von Krishty »

Bild
… und so
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Specialist
Establishment
Beiträge: 135
Registriert: 29.08.2003, 14:22
Kontaktdaten:

Re: Lustiges und so

Beitrag von Specialist »

Gerade eben nach dem Update entdeckt:
avast_update.jpg
Benutzeravatar
Chromanoid
Moderator
Beiträge: 4258
Registriert: 16.10.2002, 19:39
Echter Name: Christian Kulenkampff
Wohnort: Lüneburg

Re: Lustiges und so

Beitrag von Chromanoid »

Bild
Bild
Bild
Benutzeravatar
Jonathan
Establishment
Beiträge: 2369
Registriert: 04.08.2004, 20:06
Kontaktdaten:

Re: Lustiges und so

Beitrag von Jonathan »

Lieber dumm fragen, als dumm bleiben!
https://jonathank.de/games/
Benutzeravatar
Chromanoid
Moderator
Beiträge: 4258
Registriert: 16.10.2002, 19:39
Echter Name: Christian Kulenkampff
Wohnort: Lüneburg

Re: Lustiges und so

Beitrag von Chromanoid »

Benutzeravatar
Jonathan
Establishment
Beiträge: 2369
Registriert: 04.08.2004, 20:06
Kontaktdaten:

Re: Lustiges und so

Beitrag von Jonathan »

Fun-Fact: Nintendo und das osmanische Reich existierten zur selben Zeit.
Lieber dumm fragen, als dumm bleiben!
https://jonathank.de/games/
DerBurger
Beiträge: 7
Registriert: 26.11.2015, 18:03

Re: Lustiges und so

Beitrag von DerBurger »

@kaiserludi vom 29.10. (Keine Lust einen post mit Megaquote zu quoten)

Denke das hast du falsch interpretiert. Da hat einer vor 2 Jahren in seinem Team die Stelle als lead Dev übernommen und damit die Programmteile seines Vorgängers geerbt. Vorher hat der diesem wahrscheinlich zugearbeitet (lead dev -> follower)
Darauf dann diese Frustmail, da der Vorgänger in Wahrheit 15 Jahre lang kein Programm sondern Frankensteins Monster erschaffen hat. So etwas bekommst du in der Regel aber auch nicht mit, wenn du nur einzelne Komponenten abliefern musst, für deren Integration andere zuständig sind.

Der Text ist lustig geschrieben, zeugt von jeder Menge Galgenhumor, leider trauriger Anlass. Kommt in der Praxis immer mal wieder vor, habe das in kleinerem Rahmen mal mit einem alten Prozeduralisten erlebt. Wenn du bei einem Problem dann auf sowas stößt, hast du manchmal Glück und findest eine schnelle Lösung. Ansonsten ist es meistens effizienter ganze Komponenten komplett neu zu schreiben, anstatt zu versuchen den Programmteil nachzuvollziehen.
Benutzeravatar
starcow
Establishment
Beiträge: 527
Registriert: 23.04.2003, 17:42
Echter Name: Mischa Schaub
Kontaktdaten:

Re: Lustiges und so

Beitrag von starcow »

Ich war eben auf IMDB und habe die Top rated Movies durchstöbert, als ich folgendes entdeckte:

Bild

Man beachte Platz 25 und dann 26 :mrgreen:

Da kriegt man gleich gute Laune :)
Freelancer 3D- und 2D-Grafik
mischaschaub.com
Benutzeravatar
Chromanoid
Moderator
Beiträge: 4258
Registriert: 16.10.2002, 19:39
Echter Name: Christian Kulenkampff
Wohnort: Lüneburg

Re: Lustiges und so

Beitrag von Chromanoid »

BeniBela
Beiträge: 6
Registriert: 21.03.2016, 14:50
Alter Benutzername: BeniBela

Re: Lustiges und so

Beitrag von BeniBela »

Chromanoid hat geschrieben:Bild
Das Problem habe ich unter Linux

Doppelklick auf eine png

Dann öffnet sich der Internet Explorer

Unter WINE

Dauert ewig

Größtes Problem ist, der Internet Explorer schafft es dann auch nicht die png anzuzeigen, und man sieht nur eine weiße Seite
Benutzeravatar
xq
Establishment
Beiträge: 1581
Registriert: 07.10.2012, 14:56
Alter Benutzername: MasterQ32
Echter Name: Felix Queißner
Wohnort: Stuttgart & Region
Kontaktdaten:

Re: Lustiges und so

Beitrag von xq »

Sehr schön :D
Ich empfehle als Alternative "feh" als Image Viewer. Der ist echt angenehm, damit zu arbeiten ;)
War mal MasterQ32, findet den Namen aber mittlerweile ziemlich albern…

Programmiert viel in ⚡️Zig⚡️ und nervt Leute damit.
Benutzeravatar
Krishty
Establishment
Beiträge: 8244
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: Lustiges und so

Beitrag von Krishty »

seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Jonathan
Establishment
Beiträge: 2369
Registriert: 04.08.2004, 20:06
Kontaktdaten:

Re: Lustiges und so

Beitrag von Jonathan »

Hm, bin ich jetzt komisch weil ich schon bevor ich auf den Link geklickt habe dachte 'naja, werden vermutlich so 15 sein'?
Und weil ichs gerade nicht sein lassen kann:
Nur gibt es bei π halt keine Systematik in der Abfolge der Ziffern (also zumindest nach dem gegenwärtigem Stand der Kunst…).
Das ist natürlich quatsch, \($\pi$\) ist genau so exakt definiert wie jede andere Zahl. Ob man jetzt sagt 'jede Ziffer hinter dem Komma ist eine 3' oder 'die n-te Nachkommastelle ist durch die Bailey-Borwein-Plouffe-Formel gegeben' ist gleich exakt, nur ist Ersteres subjektiv einfacher.
Lieber dumm fragen, als dumm bleiben!
https://jonathank.de/games/
Benutzeravatar
Krishty
Establishment
Beiträge: 8244
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: Lustiges und so

Beitrag von Krishty »

Der Einwand stimmt natürlich :)

activate-power-mode atom package:
Bild
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Jonathan
Establishment
Beiträge: 2369
Registriert: 04.08.2004, 20:06
Kontaktdaten:

Re: Lustiges und so

Beitrag von Jonathan »

WOW. Gibt es das mit Sound? Ich hatte mal Atom ausprobiert und es hat mir nicht so zugesagt, aber das sieht schon extrem episch aus...
Lieber dumm fragen, als dumm bleiben!
https://jonathank.de/games/
Benutzeravatar
Chromanoid
Moderator
Beiträge: 4258
Registriert: 16.10.2002, 19:39
Echter Name: Christian Kulenkampff
Wohnort: Lüneburg

Re: Lustiges und so

Beitrag von Chromanoid »

Bild
Benutzeravatar
Krishty
Establishment
Beiträge: 8244
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: Lustiges und so

Beitrag von Krishty »

Bild
“Programmers at work maintaining a Ruby on Rails application”

http://classicprogrammerpaintings.tumblr.com/
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Chromanoid
Moderator
Beiträge: 4258
Registriert: 16.10.2002, 19:39
Echter Name: Christian Kulenkampff
Wohnort: Lüneburg

Re: Lustiges und so

Beitrag von Chromanoid »

Buchstäblich ziemlich schwarzer aber treffender Humor :)
Benutzeravatar
Krishty
Establishment
Beiträge: 8244
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: Lustiges und so

Beitrag von Krishty »

Die verhaltene Reaktion kommt doch nur deswegen, oder?

Bild
“java.util.Date”
Salvador Dali
Oil on canvas, 1931
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Benutzeravatar
Schrompf
Moderator
Beiträge: 4856
Registriert: 25.02.2009, 23:44
Benutzertext: Lernt nur selten dazu
Echter Name: Thomas Ziegenhagen
Wohnort: Dresden
Kontaktdaten:

Re: Lustiges und so

Beitrag von Schrompf »

Nö, ich sah halt nur keinen Sinn in einem "LOL, ist das geil"-Post. Kann ich aber gerne nachreichen.
Früher mal Dreamworlds. Früher mal Open Asset Import Library. Heutzutage nur noch so rumwursteln.
Benutzeravatar
Krishty
Establishment
Beiträge: 8244
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: Lustiges und so

Beitrag von Krishty »

Ich meinte Chromanoid ;) Weil er doch Java auf den Mund küsst und der Blog sich drüber lustig macht.

Vielleicht war’s aber auch wirklich nicht verhalten und ich wollte ihm nur nochmal java.util.date reindrücken ;)
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Alexander Kornrumpf
Moderator
Beiträge: 2113
Registriert: 25.02.2009, 13:37

Re: Lustiges und so

Beitrag von Alexander Kornrumpf »

Krishty hat geschrieben:Weil er doch Java auf den Mund küsst
Hoffentlich ohne Zunge.
Benutzeravatar
Chromanoid
Moderator
Beiträge: 4258
Registriert: 16.10.2002, 19:39
Echter Name: Christian Kulenkampff
Wohnort: Lüneburg

Re: Lustiges und so

Beitrag von Chromanoid »

Krishty hat geschrieben:Ich meinte Chromanoid ;) Weil er doch Java auf den Mund küsst und der Blog sich drüber lustig macht.

Vielleicht war’s aber auch wirklich nicht verhalten und ich wollte ihm nur nochmal java.util.date reindrücken ;)
Oh, den Blog habe ich mir gar nicht angeschaut, das werde ich nachholen :). Ich kann auch gut über Java lachen, außerdem gibt's ja jetzt java.time, von daher ist das Bild umso treffender ;). Die Umsetzung vorher war je eh ein ziemlicher Griff ins Klo.
Benutzeravatar
Chromanoid
Moderator
Beiträge: 4258
Registriert: 16.10.2002, 19:39
Echter Name: Christian Kulenkampff
Wohnort: Lüneburg

Re: Lustiges und so

Beitrag von Chromanoid »

Das hier ist auch köstlich:

“Their first code review”.
Benutzeravatar
Jonathan
Establishment
Beiträge: 2369
Registriert: 04.08.2004, 20:06
Kontaktdaten:

Re: Lustiges und so

Beitrag von Jonathan »

Sehr cool, danke :)

Alle Bilder die irgendwie mit git zu tun hatten, fand ich grandios, hehe.
Lieber dumm fragen, als dumm bleiben!
https://jonathank.de/games/
Benutzeravatar
Krishty
Establishment
Beiträge: 8244
Registriert: 26.02.2009, 11:18
Benutzertext: state is the enemy
Kontaktdaten:

Re: Lustiges und so

Beitrag von Krishty »

In meiner alten Firma wollten wir Ilja Repins Die Wolgatreidler in 3×2 Meter an die Wand hängen. Leider hat's die Geschäftsführung untersagt. Sehr schön für mich, dass offenbar auch andere so denken.
seziert Ace Combat, Driver, und S.T.A.L.K.E.R.   —   rendert Sterne
Antworten