Writing extra code to avoid learning new frameworks

I am a one-person store in the place where I work, and when I started there, I had zero experience and a bachelor's degree in the underlying school of computer science. In addition, my first project at the company was not only to develop good design principles, but also to teach a new language. Needless to say, my code was crappy in the beginning, and all the new features that I added since then have been hacked on top of all this crappy code. It's amazing that my software works as well as it does.

I learned TON during my work, and I am dying to reorganize my code, to make it more readable, so that future new employees can immerse themselves and help me with it. I also REALLY want it to be easier to add new features without having to hack stuff. I think it would be useful to study a structure such as Prism for WPF / Silverlight, but I have a huge to-do list (since I am a one-person store) and it looks like it will take a pretty decent amount of time just to find out how to use it.

Now I read a little about Prism, where I know the basic principles that underlie this. In addition, it's easy to write your own code that does some of the same things that Prism is used for. I actually did it already to some extent, and I am making good progress in creating more modular modules.

My question is this: should I continue to write infrastructure code that gives me exactly what I need, and nothing more, or should I spend time learning something like Prism? Or maybe it can be asked as follows: Should I spend time creating my own simple custom solutions, or should I spend time trying to understand the rich, extensive framework that can be more complex than necessary? And what factors should be taken into account when making a decision?

+4
source share
7 answers

I wrote my own PHP MVC framework for a recent project with what I needed. It was fun, taught a lot, and I really liked the experience, and I will never do it again. While a great secondary distraction project, it greatly reduced my performance on the main project.

Indeed, a lot depends on how much infrastructure you need to develop. If it's just a tiny bit that won't take more than an hour or two, go to it. If it takes a long time, use a different job, go ahead and complete your project.

+5
source

With the background that you give - mostly self-educated and unparalleled to discuss your current development, you should absolutely check out other libraries and tools. At the very least, get new input, how code can be developed, and problems can be solved. You may feel that you have achieved something - and you have, congratulations - but this is a plateau, not a peak.

"I donโ€™t have time to learn something new because I have so many things to do."
- this is what I read in your rationale for more code. This is a warning sign - you are in a dangerous position. No time to learn? No time for documentation? Isn't this the time to think about all the consequences? No time to do it right? No time to train a new employee? No time to call it a day?

You will not solve this problem by examining a prism or any other library, but this is the wrong justification.

Thirdly, the swamp code. Having more code to support makes you slower. One person startups can dig hundreds, even thousands of LOC per day, for days and weeks. As projects and organizations get bigger, you get an average of several dozen.

As a recommendation from personal experience: write extension blocks, not frames. Frames are great when you need to do the same application again and again with different company logos. Or, as TDWTF Alex says, the key is in differences , not similarities.


I donโ€™t want you to stop writing code far from it. But you are discussing a compromise, and from the information you provided, I would recommend paying more attention to learning new things.

+4
source

If your letter will work for some time in the application and should be supported, especially by other developers, then any time spent studying and integrating the standard structure will be useful.

He will provide documentation on how the application will be written, and any developer who is familiar with this database will be able to pick it up faster. It should reduce the amount of code you need to write and help you focus on your specific business problem, rather than authorizing the writing of the application.

+2
source

The main problem is how many times will you reuse the framework, while maintaining this every time you re-implement these things? Remember that the material that you write from scratch, if it should be good at all, should be tested, tested in different environments (clients and in) and saved - everything that comes to you โ€œfor freeโ€ using good, actively supported structure.

If you intend to use this infrastructure just a couple of times, perhaps the net profit is still in favor of rewriting from scratch - but if the framework covers the field that you need more than just a couple of cases, the return on investment of training in using the framework (provided that it will be good!), and remaking things from scratch will be very positive!

+1
source

I was in a similar situation when I graduated from college. I received an offer from a large company for about 1.5 years for my stay in a small company. What I found out was this (maybe different for you and others):

  • It was a great idea to work in a small company right outside the school. I say this because you have to wear many different hats. For example, you must write code, test code, deploy code, write stored procedures, etc. The end result is that you are familiar with the whole process from concept to any. I think this experience is very important.
  • I liked writing code. I remember the days when I will go home and think about how I spent the day dealing with issues of supporting production. I spent more time on customer support and wrote "one off", which I did not write mostly code.
  • Working in a big company is a bad college idea. When you work in a large company, you have a certain role for you, and you have certain boundaries. If you are a developer in a large company, it is likely that you are not deploying an application for production or setting up stored procedures.
  • Working in a big company is a great idea after a little work. This is because if you work in a small company, it will make you learn more than just coding. And if you understand that you will be the best developer.
  • Working with good developers makes you better. When you work with a group of guys who are good, you get better. This is due to the fact that each developer has a certain story that they bring to the group, and you all learn from each other. The group that I work with mostly now has: MSBuild expert, Silverlight expert and F # expert and other good guys. Therefore, some of the guys study MSBuild with me, and I learn from them. Just talking to guys who are good can make you better.

So, if I were you, do not waste too much time. Maybe 1 or 2 years, after which I will find a job somewhere that has talented developers. In 5 years you will become much better. I know that I am because of my move.

+1
source

I will play the opposite: YAGNI (you do not need it).

What to do if the framework

  • Poorly designed?
  • Is a mistake?
  • Too slow?
  • Will it be different in two years, and the old version will not be supported?

Discussions of frameworks often assume that frameworks are large, where the reality is that frameworks change just like everything else, and many frameworks are protected by what you never need.

Here are some tips that I hope relate to your more specific questions:

  • Continue to make additional improvements. It sounds like you're productive with this approach and that it pays off for you.

  • Read more about the structure. Or a few frames. Perhaps you can try a small pilot project, say, from 1 to 4 days.

  • This is an honorable strategy to learn about the structure not in order to use the framework, but in order for cherries to choose the best ideas and take them into their own projects.

  • If you decide not to accept the framework for a while, this is a simple decision to review later. If you decide to accept the structure, rolling back from it later can be very expensive. It may be worth the extra cost to reduce the likelihood of a very costly mistake.

I think that where I was burned the most depends on some other code base that has changed from under me. I call it "every Perl script I ever wrote was broken after a year." But I work on a lot of different small projects, which, as a rule, receive great attention and have a very long life compared to the time required to create it. If you have one large project that you have been working on daily for many years, you can more easily adapt to changes in the external framework.

+1
source

Who has this tool?

This is what I ask myself every time I need to solve every problem. This is a key factor in evaluating the effort required to develop a tool.

When starting a large project, each defines well-known (by the volume of the project) useful statements; thinking to increase that the level of abstraction depends on the frequency of the problem, the importance of solving the problem, efforts to develop a solution.

0
source

Source: https://habr.com/ru/post/1303193/


All Articles