Jekyll2022-08-12T10:25:56+00:00https://www.uddocs.com/feed.xmlugly duckling docsUgly duckling helps the developers to be focused on the problem they are solving. Based on the idea of templating the application logic and interface using json files, UD speeds up significantly software design and software implementation.Decluttering a developer mind2021-01-13T04:24:00+00:002021-01-13T04:24:00+00:00https://www.uddocs.com/develper-mental-sanity/2021/01/13/decluttering-a-developer-mind<p>I do not know about you but my main problem as a developer is about the many, too many, things I need to handle at the same time for a project tu succeed. The purpose of a project should be about solving somebody’s problem, simplifying, or adding value to his life. Then why we are losing so much time to activities that do not create value and do not solve any problem?</p>
<p>Focus is essential, I think we can all agree on that.</p>
<p>Web technologies in the last few years have become overcomplicated. It is not about solving somebody’s problem anymore. Many developers spend most of their time studying technology. There is nothing wrong with studying, what is wrong is to fill your mind with unnecessary details about technologies that are going to be completely different in a short amount of time. I call it <strong>disposable learning</strong>. I learn a new thing, I use it once, I throw it away.</p>
<p><strong>Is disposable learning really worth our time?</strong></p>
<p>The funny thing is that the base technologies are not changing so quickly. SQL evolves but at an extremely slow pace. We can say the same for HTTP protocol, for HTML or CSS, they evolve slowly. Languages like PHP, Ruby, Python, or Java, are evolving but they are not even close to how frameworks are changing every day. I think that most of that <strong>quick framework evolution has no point</strong>.</p>
<p>I think that a developer deserves a framework he can rely on and that allows him to work, to solve problems, and to create useful tools for his clients.</p>I do not know about you but my main problem as a developer is about the many, too many, things I need to handle at the same time for a project tu succeed. The purpose of a project should be about solving somebody’s problem, simplifying, or adding value to his life. Then why we are losing so much time to activities that do not create value and do not solve any problem?It is all about cognitive load2020-06-01T22:00:19+00:002020-06-01T22:00:19+00:00https://www.uddocs.com/free/thoughts/2020/06/01/cognitive-load<h1 id="it-is-all-about-cognitive-load">It is all about cognitive load</h1>
<p>The human working memory allows us to work with 7 items (plus or minus two).
This is the capacity of short term memory and when we program our thinking is all there, in the short term memory.</p>
<p>What happens if you fill that memory with design patterns and langauge sintax?
You forget the problem you are solving.</p>
<p>The first thing I experienced when I stated to work with UD was a great relief for my mind.
I was able to think about all interfaces and queries I felt completly free.
No more MVC, no more tree file open to change a feature, everything was close to hand.
Yes I know, SQL was still there and json syntax too. But it was so much less to handle with my brain.</p>
<p>I was able to think more about the (human) client, the problem, and I was so quick.
I was able to redesign the application in a matter of days.</p>
<p>This is what I think is the main point of using a structure like UD, it helps you the focus and think about the problem you are solving for your client.</p>It is all about cognitive loadThree different files2019-08-15T15:27:19+00:002019-08-15T15:27:19+00:00https://www.uddocs.com/free/thoughts/2019/08/15/threedifferentfiles<p>Do we really need to work on three different files, in order to make a query and show the results in a web page?</p>
<p>The MVC approach changed the way coders made their application. Before MVC taked off it was plenty of spaghetti code everywhere. SQL statements surrounded from JAVA or PHP code all dressed with a generous portion of HTML. It was a mess!</p>
<p>The MVC has given structure to code and helped the devolepers to understand they needed structure and discipline.
The MVC had a very good impact on the developers community.</p>
<p>That sayd I wonder: <strong>“Do we need MVC all the times?”</strong></p>
<p>The problem I had with frameworks is that they forced me to use MVC. Sometimes it is good to have model view and controller, sometimes it is not.</p>
<p>The main problem I had with MVC is the fact that in order to build a page you need the joined efforts of at least tree files. I say at least because sometimes the view is fractionated in more than one file and sometimes your controller calls more then one model and you find your self having many many files open in your editor and your eyes are jumping from file file trying to understand what is going on in that page that does not respond as it should.</p>
<p>There is so much complexity going on and that complexity is distracting and <strong>distraction lowers your productivity</strong>.</p>
<p>When I develop an application using UD I am not distracted because all the code necessary to define the look and the behaviour of a panel is contained in just one file. A page of code with a piece of business logic defined completely in one script. So <strong>I am able to focus</strong>.</p>
<p>If I am defining a <a href="/docs/table-page">table</a> I can write the SQL statement at the top of the script, I specify the structure of the table just a litle lower and… that’s it.</p>
<p>If I am defining a <a href="/docs/form">form</a> I start writing the eventual query to pre-fill the fields, I define the structure of the fields and I define the query that updates the database at the bottom.</p>
<p><strong>I am working on a script at a time.</strong></p>
<p>That helps me a lot to avoid to loose focus.</p>
<p>I do not want to say that using my approach you can solve any possible problem, I do not want to say that MVC is always a poor approach, I just want to say that sometimes you can use MVC sometimes you can work on a UD json template.</p>
<p>If you are curious about my library you can start from <a href="/tutorials/crud">the CRUD tutorial</a>.</p>Do we really need to work on three different files, in order to make a query and show the results in a web page?The forgotten problem2019-08-01T15:27:19+00:002019-08-01T15:27:19+00:00https://www.uddocs.com/free/thoughts/2019/08/01/forgottenproblem<h1 id="the-forgotten-problem">The forgotten problem</h1>
<p>We, as programmers, are funnny creatures.</p>
<p>We like to define our-self as people that loves to solve problems but when we are called to action we prefer to spend our time thinking about technology, frameworks, design patterns, and…. we tend to forget that <strong>we need to solve our clients problems</strong>.</p>
<p>When I receive a document with technical specifications of a system, I start to think about possible implementation solutions, I think a little about the interface, about the necessary libraries and I start to code the business model.</p>
<p>Coding a model is tricky, at the start I am completely focused on the business model and on the reality I am modeling but after a while I start to focus more on the programming language technicalities: hierarchical structure, interfaces, design patterns and I tend to loose the focus I had at the start of the real problem I was going to solve.</p>
<p>Many frameworks promised that they would be helpful speeding up my work and keeping me focused on the business logic but they too often ended up in structures too general that made more complicated to get to a solution.</p>
<p>With time I realized that <strong>to keep my stack of techologies thin was wise</strong>.
I tried to be as close as the nature of the technology I was using I could. I started to be create my prebuilt solutions. I did not want them to be too general, I wanted them general enought in order to simplify my life. When you abstract too much you tend to loose the connection with the reality of things.</p>
<p>After all, when you create a web application you build form that allow the user to POST data and pages to navigate and show that data.</p>
<p>Having this in mind I started from the single page perspective and I wondered what was always the same and what was changing all the time. I started to create models for the most used pages like <a href="/docs/datatable">tables</a>, <a href="/docs/form">forms</a> and so on and then I had this idea of putting all things that were generally changing in json files. I built a system that crunching those files was capable of creating a working application and… I ended up building my application framework.</p>
<p>And then I stated to create json definitions for more structures like <a href="/docs/info">information</a> panels and <a href="/docs/chartjs">charts</a>.</p>
<p>At the end I started to make containerr in order to group pages elements like <a href="/docs/dashboard">dashboards</a> or <a href="/docs/tabbed-page">tabbed pages</a>.</p>
<p>I even tought that was a good idea to define <a href="/docs/group">groups</a> of user using json files.</p>
<p>I don’t know if it was necessary to create one more framework, I even felt guilty for that, but it made my life easier, I am currently using it in order to build more application and it is simplifying my life.</p>The forgotten problem