feeling stuck :/ for the last 3 days I'm struggling with the same problem -- how to refactor that core thingie into a sufficiently reusable abstraction...

  • 1
    If at first you don't succeed, a DSL will probably get you paid.
  • 0
    @SortOfTested that's my personal project, so I'm not bound by deadlines. And introducing a DSL feels... sloppy at best.
  • 2
    How big is core thingy...

    Sounds like 'very' big.

    In the most extreme way, you could go the "desperate" route.

    Print the code, lay it out on the floor and start puzzling. Visualizing can help.

    Somehow reading your name and your struggle makes me thing that that must be quite a beast.

    I did the above three times in 15 years...

    Project Berzerk, taking a PHP 4 clusterfuck process with tons of lines... The process consisted of a full process chain from evaluating order, calculating shipment, printing order labels, processing shipment data and weight taken by a human and then sending it. Process with a lot of states.

    Project Hiob - mostly a order process for ordering and importing products from china and the distribution to clients.

    Project Prometheus - migrating this clusterfuck of a large network to something sane and not shitty... Which I nearly finished this weekend. Planning alone took a month.
  • 2
    personal project? sometimes you need an outside perspective.
    Ask a fellow programmer for his thoughts. And ask her/him to hold you accountable with finishing this task.

    Also doing something else and revisit a project later helps sometimes too. As you may are too emotionally attached to the project that you fail at seeing things clearly?
  • 1
    You just need to begin
  • 1
    @Mb3gr not true. Before beginning the motion one must establish a direction first.

    @heyheni I agree. However, I don't have anyone else on that project :)
    as for being too close - yeah, that's possible. I practice the stand-back-and-look-from-aside technique occasionaly. Maybe it's time to do that now.

    @intrusioncm - not that big yet, but as it describes the essence of my core functionality, it's pretty much the main direction my project is going to grow in.

    I may have found the culprit - I may have violated the SRP :/ that'd explain why I'm stuck at generalization and at some point I have to do serialization-deserialization twice...
Add Comment