Managing code transitions between developers [closed] - project-management

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
What are your best practices for making sure newly hired developers quickly get up to speed with the code? And ensuring developers moving on don't set back ongoing releases.
Some ideas to get started:
Documentation
Use well established frameworks
Training / encourage mentoring
Notice period in contract

From a management perspective, the best (but seemingly seldom-follow) practice is to allow time in the schedule for training, both for the new employee and for the current developer who'll need to train them. There's no free lunch there.
From a people perspective, the best way I've seen for on-boarding new employees is to have them pair program with current developers. This is a good way to introduce them to the team's coding standards and practices while giving them a tour of the code.
If your team is pairing averse, it really helps to have a few current diagrams for how key parts of the system are structured, or how key bits interact. It's been my experience that for programs of moderate complexity (.5m lines of code), the key points can be gotten across with a few documents (which could be a few entity-relation document fragments, and perhaps a few sequence diagrams that capture high-level interactions).
From the code perspective, here's where letting cruft accumulate in the code base comes back to bite you. The best practice is to refactor aggressively as you develop, and follow enough of a coding guideline that the code looks consistent. As a new developer on a team, walking into a code base that resembles a swamp can be rather demoralizing.
Use of a common framework can help if there's a critical mass of developers who'll have had prior experience. If you're in the Java camp, Hibernate and Spring seem to be safe choices from that perspective.
If I had to pick one, I'd go with diagrams that give enough of a rough map of the territory that a new developer can find out where they are, and how the big of code they're looking at fits into the bigger picture.

Related

KISS & design patterns [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm presented with a need to rewrite an old legacy desktop application. It is a smallish non-Java desktop program that still supports the daily tasks of several internal user communities.
The language in which the application is both antiquated and no longer supported. I'm a junior developer, and I need to rewrite it. In order to avoid the app rewrite sinkhole, I'm planning on starting out using the existing database & data structures (there are some significant limitations, but as painful as refactoring will be, this approach will get the initial work done more quickly, and avoid a migration, both of which are key to success).
My challenge is that I'm very conflicted about the concept of Keep It Simple. I understand that it is talking about functionality, not design. But as I look to writing this app, it seems like a tremendous amount of time could be spend chasing down design patterns (I'm really struggling with dependency injection in particular) when sticking with good (but non-"Group of Four") design could get the job done dramatically faster and simpler.
This app will grow and live for a long time, but it will never become a 4 million line enterprise behemoth, and its objects aren't going to be used by another app (yes, I know, but what if....YAGNI!).
The question
Does KISS ever apply to architecture & design? Can the "refactor it later" rule be extended so far as to say, for example, "we'll come back around to dependency injection later" or is the project dooming itself if it doesn't bake in all the so-called critical framework support right away?
I want to do it "right"....but it also has to get done. If I make it too complex to finish, it'll be a failure regardless of design.
I'd say KISS certainly applies to architecture and design.
Over-architecture is a common problem in my experience, and there's a code smell that relates:
Contrived complexity
forced usage of overly complicated design patterns where simpler
design would suffice.
If the use of a more advanced design pattern, paradigm, or architecture isn't appropriate for the scale of your project, don't force it.
You have to weigh the potential costs for the architecture against the potential savings... but also consider what the additional time savings will be for implementing it sooner rather than later.
yes, KISS, but see http://www.amazon.com/Refactoring-Patterns-Joshua-Kerievsky/dp/0321213351 and consider refactoring towards a design pattern in small steps. the code should sort of tell you what to do.

I've been programing for six year and my homework in University gets marked down for coding style [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been programming for the last 6 years. I just recently started my first degree in computer science. My work seems to be constantly marked down for different reasons, amongst many of them:
Uncommented code
Writing too long identifier names and methods
Writing too many methods
After working as a programmer for six years for numerous startup companies, and absorbing best practices which include the requirement to write "self explanatory code" I find it very difficult to go back to bad practices.
What can I do?
Self documented code is not synonymous with comments.
I've argued with many senior devs around this point. Code can go a long way in communicating intent but there are some things which simply cannot (and should not) be documented through code.
For example if you have a highly optimised function/method or chunk of code which is heavily coupled to the underlying problem domain and requires very specific knowledge of the business or solution. Comments are needed in these scenarios.
Yes, yes, comments come with there fair share of problems but this doesn't mean they aren't helpful (or mandatory in certain cases).
I can't tell you how many times I've read a colleagues line of code and thought "what the hell?!?" only for them to explain that they needed to do that due to some quirk of some library or browser we were targeting etc.
Comments are a mechanism for a developer to justify a design decision.
As for your other problems, they are subjective. How long is too long? How many is too many?
Point them at Microsoft's guidelines if you are on the MS stack or there will be countless articles for whichever language you're using...
Hope that helps.

Go's Disadvantage [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I've been learning Go for a while and found that it has a lot of good features (simple and clean syntax, fast compilation/execution, good support for concurrency, first class functions, etc). But very few popular projects are developed in Go.
I'm just wondering what are the main disadvantages that restricts Go from becoming a mainstream language? Can someone come up with a kind of program/project for which Go is obviously not suitable to be used?
Go is only 3 years old. C is more than 40 years old. C++ more than 30. Perl 25. Ruby almost 20. Java is a relatively young language at 17, and C# quite young at 10 (or 12, depending on how you count it). And Java and C# had a lot of resources thrown at making them dominant, with Sun and Microsoft investing in all kinds of tools and libraries and getting people trained in them. Compared to that, 3 years is almost nothing. Google spends some money on developers for Go, but at nowhere near the scale of C# and Java. And 3 years isn't a lot of time for really prominent products to be written and released in Go.
Give it a few years. Write some code in Go. Maybe yours will become the next prominent project.
As far as what it's not suited for, it's not suited for anything that requires a really mature language and toolset. If you want fancy refactoring IDEs, tons of off the shelf libraries, and lots of tutorials and information online, you probably won't find that yet. The last I checked, its garbage collector was a little weak; it's possible to get leaks due to mistaking integers for pointers, since it's a conservative collector. This could be fixed by now, but its indicative of the relative immaturity of the Go implementation; there are certain things that may be solved problems in other languages (or have well-known workaround patterns), which are still a bit up in the air for Go.

How to write a desktop app that filters test questions according to topic [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
What programming language/method would be best suited to writing a desktop app that
filters question types and displays a listing of those questions to view.
For example, if I have a mix algebra, geometry, and calculus questions stored in the app,
I should be able to select just the algebra questions to view and print.
I have a little experience with python/django but I've never made a desktop app before.
You have lots of options. You will need to make several design decisions before you move forward. Things to consider are:
Which technologies do you feel comfortable with?
How much time/effort do you want to put into the project?
Are you willing to spend money on tools?
Etc.
That being said, the rest of this answer is to give you some options to consider:
You'll need a data structure which can filter the problems for you.
From your description, the first thing I thought of was using a
database, however I'm not sure if you are familar with databases, in
which case you'd have to create some classes/structs that would allow for you to do the filtering yourself. Some options for databases are SQL Express, Oracle, MySQL, DB2, and many more.
Another thing to consider is you mentioned several different type of
math problems. You'd want to consider how you would be displaying
the problems. Mathematica formats math problems nicely, but if you
wanted to go down this road, you'd either have to find a tool that
would allow you to display that math problems in a syntax like
Mathematica or do exports/screen shots of the problems and have those as
part of your program.
Another option would be to try to find a
language that has some sort of plugin for TeX or LaTeX (For example,
you can see how wikipedia allows for nice math formatting here:
http://en.wikipedia.org/wiki/Help:Displaying_a_formula
This sounds like a good pet project to play with to learn different technologies. If that is the intent, great. If not, then you might want to do some googling to see if someone else has already created what you are looking for.

Algorithmic music composition [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
(edited)
For anyone interested in music and artificial intelligence:
Do you know of any music-composing algorithm that produces really interesting, fun or intelligent music? And not something sounding like a random noise.
(Previous, too broad question:)
What are some state of the art (very good, non-boring) music composition algorithms, software, researches that you have heard of?
Feel free to post any interesting link about this subject.
P.S. I don't mean programs that assist you at playing, but primarily anything that can compose melody by itself (or with little assistance).
OR: Analyses existing music pieces and tells how much it likes them :)
One of the leading researchers in algorithmic composition is David Cope of the University of California, Santa Cruz. His approach emphasizes machine learning, the results of which were impressively demonstrated in a 2006 performance.
http://www.wired.com/wired/archive/14.09/posts.html?pg=3
A good place to start would be with his aptly named book, The Algorithmic Composer, which covers much of his approach and provides most of the software he has written for his work.
http://books.google.com/books?id=rFGH07I2KTcC
Though not specifically algorithmic composition another invaluable resource is David Temperley's book, The Cognition of Basic Musical Structures, which provides quite a few models begging to be implemented.
http://books.google.com/books?id=IDoLEvTQuewC
Those two alone a pretty time consuming for anyone with an interest in that they are concrete enough that experimenting along the way is inevitable.
Hope that helps.
One possibility would be to use a hidden Markov model: feed it samples of music, and have it generate "similar" music.
One example: http://www.cogs.susx.ac.uk/users/christ/talks/music-making-with-HiMMs.pdf
I did something similar with Shakespeare's sonnets. The results were ... interesting. Amusing, at times.
There's a search engine that lets you whistle a tune and that searches for music alike. I'm not sure whether http://www.midomi.com/ is what I originally heard of. You can for example play the music and see if it finds what you intended.
A fellow student of me created a score composer for his Master's project. The input was humming or whistling and through FFT, music theory and combinatorial algorithms (I'm not sure whether it was simulated annealing). I'm not sure how it was related, but the project had something to do with the http://www.wikifonia.org/ project.
(edit)
I heard a talk from someone who worked at http://last.fm. They analyze music (machine learning) as one of the ways to overcome the cold start problem in their recommender system. They try to predict how much a new song resembles other songs.

Resources