Het dagboek van dS
Inhoud blog
  • Bedankt voor overschakelen van proximus => proximus
  • How to annoy the hell out of your developers
  • Pearls before swine
  • Write it yourself or using a third-party tool?
    Zoeken in blog

    Beoordeel dit blog
      Zeer goed
      Goed
      Voldoende
      Nog wat bijwerken
      Nog veel werk aan
     
    15-07-2013
    Klik hier om een link te hebben waarmee u dit artikel later terug kunt lezen.
    A good design does not end with following some simple (or complex) design patterns.
    For small projects these things won't matter much but keep in mind that small programs become big fearly easily. 

    To measure a good design versus a bad design I introduce the concept of complexity.

    I measure the complexity of a method and a class by the number of concepts a programmer needs to keep in his mind to understand the system.
    A regular person will be able to keep up to 7 concepts in his mind at all times.  (Miller's law.) http://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two
    If you have more than that, your design will not be comprehensible to anybody but experts.

    The root cause is a overly flexible possibility to use whatever class you feel necessary.
    If every class can just use any other class you'll find a cobweb graph of class usages. To be able to understand a complete object you must understand all concepts. 

    As a solution I would propose to use facades (or just composition classes) that will hide the additional classes. 
    If a facade covers off 5 very specific classes then users, that have nothing to do with hoverboards, will not need to know about them in the much more fascinating accounting section of your program. 

    Composition classes are classes that use classes in the underlying namespace only. So a composition class would use a namespace underneath it to contain all used concepts and classes. 

    An example: 
    An ImageProcessor can do all kinds of things to an image. 
    It can scale them, crop them but also apply a fourier transform on them. 
    The concepts of scaling needs to be know to be able use the image processor. 
    If a user interface shows some sort of icons then the user interface shouldn't know about scaling. 
    It should know about icons. Failure to do so, will create a complex UI that knows about scaling, cropping. We could go as far as to introduce the concept of Fourier transformations in them. 

    This has some very bad properties to it. 
    - The UI developer must know about Fourier transforms. 
    - More concepts makes it all more complex.
    - A Fourier transform isn't a UI concept.

    Now we work towards creating an algoritm to sort concepts. 

    First create the domain of the user. Concepts the user should know about. 
    Concepts that a user doesn't know should get grouped into facade groups and be hidden properly. 





     




    15-07-2013, 13:36 Geschreven door denshade  

    0 1 2 3 4 5 - Gemiddelde waardering: 0/5 - (0 Stemmen)
    01-02-2013
    Klik hier om een link te hebben waarmee u dit artikel later terug kunt lezen.Bedankt voor overschakelen van proximus => proximus
    Proximus liet me net weten dat ze heel gelukkig zijn met mijn overschakelen naar proximus. 
    Das vreemd, ik ben al jaren klant. 

    Ze bedanken mij voor het vertrouwen... 

    01-02-2013, 15:26 Geschreven door denshade  

    0 1 2 3 4 5 - Gemiddelde waardering: 0/5 - (0 Stemmen)
    29-11-2012
    Klik hier om een link te hebben waarmee u dit artikel later terug kunt lezen.How to annoy the hell out of your developers
    So scrum had finally been put to rest like the ugly beast it is. 
    Our scrum board is now an undead cadaver with left overs of our long past sprint. We mustn't go onto our next sprint until all items are completed our apparently scrum educated CEO chants.

    It's only because of my divine intervention that we have come to this efficient sprint, hah, with a little smirk he stated. 
    What we actually did was pick the low hanging fruit and ever after in a panicking rage solve 'bugs' that are merely misunderstandings by our customers.

    So behold the numbers of our much better sprint which is now like such: 
    15 hours of actual work
    92 hours of bugs and chasing our own tails in panic. + 1 extra week of bugs

    Nicely done!
    Today was the best, I was trying to be productive but luckily I was kept back by things that must be solved NOW.
    Most of the time goes into understanding what mystery the customer believes to be wrong yet again or in what dung ball of code I would end up.
    At the end I was pleased to know that their problems were caused by mere bad configuration or misunderstanding. Also a faulty third party tool came to join our little party. Needless to say, without knowing what the real problem is our CEO insists that it be fixed tonight. 

    Is there a real reason why this is so urgent? Not really. Probably it's time to spend some quality time doing unpaid overhours, oh wait I resigned days ago. Why would I even bother?

    I must say, we had a blast. 

    Frankly I think I care too much.  


    29-11-2012, 20:38 Geschreven door denshade  

    0 1 2 3 4 5 - Gemiddelde waardering: 0/5 - (0 Stemmen)
    18-11-2012
    Klik hier om een link te hebben waarmee u dit artikel later terug kunt lezen.Pearls before swine
    So I spent half a year introducing something that looks like Scrum. 
    We have a scrum board and everything. I trained a colleague and stuff was starting to work out.  
    You should know we had plain chaos with people shouting and the alarming question why it isn't finished yet. Clearly it was development that had no clue or was either incompetent or lazy or maybe just both. 
    The truth was a history of 3 years of technical debt and technical analyses with details like: Wants the product [X] yes [] No.
    You'd then have customers outraged by development not delivering what sales has promised. But what did they promise? 
    Sales would just promise that it would be finished in 3 days. They even promised an integration with a automated telephone dialer. Now don't get me wrong, I like a challenge. But telling people you'll fix it in 3 days just doesn't make things fun anymore. 
     
    So we introduced user stories and tried to bring in estimates. Well at least more accurate ones than everything costs 3 hours.
    Another simple rule of thumb is, you stick to a planning. You can't change the running direction every 5 seconds. So the scrum master defends the sprint and all of that classic logic. 
     
    Sadly the CEO, which happens to be the sales lead would not take no for an answer. So what we had was a struggle of several months. Surprise bugs coming in and sprints being hijacked by what sales thinks we should be doing every 5 minutes. 
    So my newly trained scrum master quit. 

    We are back to DO MY BIDDING NOW mode. Well that was time well spent. 

    18-11-2012, 21:42 Geschreven door denshade  

    0 1 2 3 4 5 - Gemiddelde waardering: 5/5 - (2 Stemmen)
    15-04-2012
    Klik hier om een link te hebben waarmee u dit artikel later terug kunt lezen.Write it yourself or using a third-party tool?
    I've noticed this nice trend in programming in which more and more open source tools come available. 
    Programming has become more and more just integrating one technology with another. Or is it? 
    This leads to the question: 
    Should I write it myself or reuse the work of others?

    Some say you shouldn't reinvent the wheel and just reuse code as much as possible. 
    Well it might just not be that easy. Before running for the hills and be convinced this is all there is to it,  I'd like to show you that it is in fact a complex matter. 

    Let's take the simple example of a database. Obviously you aren't going to write a database yourself!
    Well let's see. 

    Here we'll use 'database' as the technology to be used. Just to have something less abstract. 

    So you'll need to learn how to use your database. We have SQL these days. This helps a lot. Sadly not all technologies have a unified way of doing things and you'll spend a lot of time learning a new language. As a matter a fact most technologies just have a different interface on how to use it. 

    Not to mention what happens if you think you know the language but are insufficiently trained. I've seen it happen for Maven once. We had a few people that knew Maven. It came to prove that actually all they knew was the syntax. There were hundreds of problems we tried to solve the wrong way. At the end the concepts were misinterpreted and it was a big mess. Months were lost trying to do it the right way. Not to mention they never actually adopted the correct way of using Maven at the end since they didn't have the time to integrate it. So they still experience the same problem. They still don't know for sure what artifacts they'll get and their build still takes half a day. While at the end the project is fairly simple. 

    I can have their build work properly in ant (which I know much better) in a few days. They lost months already. 

    So short tip is: Learn your tools properly. Without it you might just lose a lot of time. Don't skimp on training. 

    The next thing you'll need is a way of debugging the tool. You'll need to know why your database isn't doing what you expected. 
    This is where lots and lots of tools fail. If you're in luck you find a forum that will tell you what silly mistake you've made. 
    On the other side I've seen more forums containing 'Yeah I have that problem too' or 'Yes, fixed it!' rather than actual answers. 

    I've also seen solutions not fit for environments that are in production. Much like: 'Ow, just put change the configuration and restart your database and do this and that.' 
    Well, I can't just go around and switching databases off and on again on production environments without losing customers...
    Also following the advice of someone I don't know I can trust while it can cost me or the company money? Nah. 

    Tip is: If your database (or tool) has no easy way of debugging it, it's worthless. You'll lose days and if you're anything like me, you'll lose your temper -- a lot!

    I've also had a bad encounter with Hibernate. It was working as expected and it was fun and games until we wanted something kind of strange.
    They had a problem and fixed it by hacking it away by doing the work of hibernate by using hibernate. After debugging for days -- and I was lucky to have the code -- I found a chicken vs. the egg problem. 
    We lost actual months to fix it. At the very end I understood that what Hibernate was doing was in a way correct but not what we needed. 
    Don't get me wrong, Hibernate is good tool but wasn't fit for the job. 

    Tip: Ask an expert if this tool is actually what you need. Can it actually do what you want? 

    Another aspect is that you might just not need all the features it has. Maybe you are choosing the wrong tool? 
    If all you want to do is some simple logging, maybe you don't need a database after all? 
    It's what I call feature drag. You're dragging all the features and their special cases with you. For no good reason. One might think, well then don't use that tool then? Sadly most of the time it's just that tool that is mature and remotely close to what you need. 

    Tip: Use the tool you need, don't use anything too complex. 

    Integrating the tool into your product is also a burden to carry. You'll need to install it separately, also make sure the licenses are ok! 
    I've seen many tools that actually need you to compile with their stuff taking yet another bunch of days and unforeseen problems. 


    But at the end the advantages are also clear:
    1) You have a community that might be able to help you with your problem. (Not guaranteed of course)
    2) You don't spend time and money writing this component & fixing its bugs. 

    On the other side: 
    If you write your own tool. 
    1) You (hopefully) understand your code. 
    2) You can debug and fix problems yourself
    3) You wrote it, so you understand how it works. 
    4) It's exactly what you need. 
    (5) I like writing code :)) 

    So to conclude:
    The equation is not an easy one. You don't want to write your own database, that's for sure. But also don't go around using third party tools for anything trivial. 

    Honestly if you yell -- oh that's easy! Just use a third party component or you'll be reinventing the wheel -- without thinking it over, you deserve to get hit in the face with a shovel, twice. But that's just my opinion, I could be wrong.

     

    15-04-2012, 13:42 Geschreven door denshade  

    0 1 2 3 4 5 - Gemiddelde waardering: 4/5 - (1 Stemmen)
    Archief per week
  • 15/07-21/07 2013
  • 28/01-03/02 2013
  • 26/11-02/12 2012
  • 12/11-18/11 2012
  • 09/04-15/04 2012

    E-mail mij

    Druk op onderstaande knop om mij te e-mailen.


    Gastenboek

    Druk op onderstaande knop om een berichtje achter te laten in mijn gastenboek


    Blog als favoriet !


    Blog tegen de wet? Klik hier.
    Gratis blog op https://www.bloggen.be - Meer blogs