25 ms·
Really curious why you'd want to study these unless you already had strong fundamentals in application architecture and are not afraid to expose yourself to ant
by persistent 7y ago
Really curious why you'd want to study these unless you already had strong fundamentals in application architecture and are not afraid to expose yourself to antipatterns. GIMP/GTK in particular are a cornucopia of terrible ideas stemming from ignorance and prejudice.
- slovenlyrobot 7y agoThis wasn't necessarily the most constructive thing to say, but it unintentionally invites a silver lining: studying failure is the most effective route to success. This is as true in software as it is in operations, economics, finance or pretty much any other discipline.
- koolba 7y agoStudying failure is better than not studying, but it can’t hold a candle to to studying success. As an extreme example, seeing ten spaghetti codebases does not teach you much more than the first. But expanding your mind by studying new patterns and paradigms, skillfully and elegantly woven, will build upon everything you’ve already mastered.
- tempguy9999 7y agoAbsolutely not true. I've learnt more from my failures than my successes. I'm more interested in other people's failures than their successes. Understanding why a conceptual error was ever allowed to be realised is very instructive and a very cheap lesson (if it's something you weren't involved in!). Seeing a clusterfuck of microservices blooming darkly in the midst of a project, watching time being wasted sorting it out every bloody time more code was checked in, sucking precious time from the rest of the projct - you can learn a lot immediately. Lesson: don't use them without good reason. Or seeing a function that takes a geographical area and returns a list of progressively larger areas that enclose it eg. give buenos aries, it returns argentina, south america, america, the world. But note that the function does not return its input (buenos aries) which caused every bloody call of that function to have extra code to add it back in because it was needed. Lesson 1: the output of a function like this is always likely to need its input for our app, so provide the input with the output. Lesson 2: If it's evident a function isn't quite adequate, provide a wrapper function that does what's needed so the users don't have to write workaround code every time. > skillfully and elegantly woven (giggle). Not on my planet!
- Dreami 7y agoCould you elaborate a bit? I don't know much of their code base (but I've used it as a user) and I'm curious as to what is done wrong.
- persistent 7y agoGTK and GIMP both suffer from the original decision by people who don't understand C++ to reinvent it in bare C except very poorly. It's what you get if you heard a rumor that vtables are bad somehow but don't realize that an array of function pointers is worse in every way.
- slovenlyrobot 7y agoHaving worked with GObject extensively, including through PyGObject, I can say the experience is infinitely better than trying to make C++ interoperate with e.g. Python. (This coming from someone writing C++ since 2002)
- persistent 7y agoThat makes sense since the implementation of things in GObject is basically the same as the internal architecture of Python. Since it's all just named properties and function pointers there's no chance that the compiler will rearrange it and break introspection. On the other hand there's also no chance that the compiler can optimize a GObject program, so you've traded good performance for an easier-to-use FFI for Python which might not be the trade I would have made. They've also traded away core developer productivity in order to make foreign language developers more productive, again a tradeoff I might not have made.
- icebraining 7y agoSo is it a cornucopia of terrible ideas, or just a platform that has different goals and therefore tradeoffs?
- rumanator 7y ago
- ngold 7y agoWhat's wrong with gimp? Been using it for a decade with no trouble.
- RobertKerans 7y agoPoor/questionable [initial] architectural decisions at a codebase level don't mean that the end product doesn't work (WordPress IMO being a very good example of this -- famously crufty codebase but the product definitely does the job). Just means it's not _necessarily_ a great subject for an architectural breakdown.
- mattl 7y agoWordPress is a fork of b2.
- ImNotTheNSA 7y agoThere are many open source projects that are terrible codebases but have great support. Example for me... lwIP. One of the worst APIs I’ve ever used, but it works damn near perfectly once you hack through it. Maybe that says something. It certainly doesn’t make the code or behavior any easier to understand, though. I guess that’s why many company’s are going with the “code is meant to be read, not written” thing
- liability 7y agoUntil rather recently it took a PhD in computer science to draw a circle in gimp... I still love it though.