What are some rules on making your code look efficient? [closed] - react-native

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm a React Native Developer from the past 7 months. And this is my first technology I'm working on. So, I recently got to know that there are certain coding rules which I wasn't following and was unaware of. I have two general programming questions.
So I just got to know from an inteview that one should create wrapper functions in their code, by which I can just call a single function which points to a module or a API.
Like wrapper functions, what else is a good practice in programming?
Since I never worked on Android/iOS before and directly jumped to React Native. I often find myself doing trial and erros when it comes to do styling in my application.
Or what is the right way to style an element without giving too much margin/padding, which I assume is wrong. Or what is the right way to style where the styling works the same in all devices. Can someone recommend me a right article or video or something for this styling issue?

This may well be the broadest question(s) on StackOverflow :-). Just a few suggestions for the first question.
1. Read :
Many books have been written, some down-to-earth (Clean Code, The Pragmatic Programmer, Code Complete, Refactoring, ...), some more theoretical (Structure and Interpretation of Computer Programs, ...).
2. Collaborate :
You can sollicit code reviews from colleagues, have pair-programming sessions with them, attend coding dojos or hackathons. All of these are ways to share and transfer knowledge among peers, are very helpful, and almost always fun, too.
3. Play :
Sites like codewars.com are great to let you experiment with huge numbers of coding challenges, risk-free, and with the bonus benefit of seeing the solutions of others (once you're done :-)).
Maybe it's worth posting the second question separately, with the appropriate title. Good luck!

Related

If it is possible to make games without coding, why code one? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I'm pretty new to coding and while searching on random stuff on the internet i found out that it is possible to make games without a single line of code with the help of game-engines like Unity. So what merit is there in coding a game? I have my guesses but i would like to have an answer to be sure, thank you in advance.
Unity requires coding for anything truly custom
You can get quite far with Unity just using already built stuff, but that's just the problem. You are limited to using the parts someone has already made and combining them. Now, that does allow for a heck of a lot of combinations but that is as far as you can go.
You are also limited in your ability to correct unwanted behavior in precisely the way you want it to be corrected.
You need to learn coding in order to make games and that includes using gaming engines such as Unreal or Unity engines. The main reason on why you would need to learn coding is to add logic to your game such as moving your character.
If you are using Unity I would suggest referring to the following link and learn more about scripting(aka coding) and how can you implement it in your game and that way you would have a better idea on why/when coding is essential to the game you're creating.
https://learn.unity.com/project/beginner-gameplay-scripting?courseId=5c61706dedbc2a324a9b022d

New job, Giant project [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
So, I just started a new job a few weeks back. It is my first job doing software, and I have been tasked with learning how a giant project works. Now, the guy before me left NO (zilch) documentation or comments anywhere in the source code. In addition, he applied basically EVERY design pattern in the famous design patterns book by Gamma, etc...
My question is, how do I start? I have tried setting break points for certain calls that I want to learn (learn bit by bit), but because of the 5 million design patterns employed, every call goes up about 7 levels just to finish, and by then, it's hard to keep track of the 20 some objects being created and used.
Has anyone had a similar experience? A few pointers on different methods to try?
Specs: language - VB.net
IDE - Visual Studio 2010
Using - Windows Forms
Brain - Melting
Inheriting a large project without documentation is always a huge pain in the ass. I hope you have already accustomed your manager to the inconvenient truth that it will take several weeks or even months until you can maintain that project efficiently.
I would start with creating some UML class diagrams. That could tell you a lot about how the system works and which design patterns are used where.
While doing so, I would also add comments to the code with everything I learned about it. When I am not sure if I understood what the code does correctly, I would add a common string like "NOT_SURE" to the comment. Later, when I have a better understanding of the system, I could use a text search to find and revise these comments.

Optimal amount of Automation rework [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
During the development cycle of a feature, the feature is constantly changing, even after the point where the it meets all requirements (UI improvements, etc...). If you have automated tests for that feature, these changes can break your automation and you will have to rework it. If the feature keeps changing though, it does not make sense to rework automation after every revision. At some point, however, you have to automate it so you can do regression testing. How can we find the optimal time to rework automation? How do we get the optimal amount? My team agreed that we over-reworked the automation of one of our features. One example of a mistake we made was to rework automation right before a conference where we showed the feature off to customers to get customer feedback. We should have known that customer feedback would result in more changes to the feature. Functional testing should have been enough in that case.
Does anyone have any tips or experiences to share?
The general tip would be to come to a consensus on what "done" means for the feature before you you start building it.
If during the build you come across some new tweaks that you'd like to add to improve the feature (or whatever) don't add them to the existing story - write a new one... and make sure that you prioritise it against the other things that you need to be doing.
This is also sometimes, but not always, a sign that you're working with increments of functionality that are too large. Try splitting and thinning the stories further until you can write down some quite concrete definitions of "done" for the feature. Consider automating those tests of "done" before you start building (but don't go overboard).
You might find the Specification By Example book of use.
According to my experience is that the feature you've been developing is not understood by the customers yet, fully.
Separate the feature into small parts like #adrianh suggested.
One more tip for the instable customers: Let them first see the pseudo prototype at first hand, even maybe in the planning meeting (code it directly to html or something easier something like a prototyping/diagramming tool). Let them play with it. This way, you will have an easier time with your features.

How to write technical documentation of a web site/software for new developers? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I want to make a technical documentation of an existing web site for developers so that new developers can continue to work with it. In existing codes, little (or not at all) in-code comments or doc-strings are available (bad practice, I know). Yeah, I have seen some posts related to these. But those were not that detailed. Here are all my questions:
What to include?
How to organize? I mean, can you suggest some hierarchy so that new developers can easily get onto the track?
What are the best practices?
Can you show some samples?
How can it be made easy? Some ppl suggests wiki tool but I know nothing about it, will it be useful? Can you suggest any tool with some quick starting tutorial?
I have never made one. So I appreciate any kind of answer. Thanks in advance.
(Links will be helpful but please give a quick and lucid summary of it)
Quick and lucid:
Think of it like any paper.
What is the goal of the app (website)? [why?]
How does it achieve this goal?
What problems have arisen?
What problems could arise?
What could be expanded upon? [why?]
What problems could expansion cause? [why?]
What naming/formatting conventions should continue to be followed?
Outline format is great.
In addition to Nona's suggestion I would also say that it is important to break down the code and explain any conventions and intentions of the code so that there is uniformity between developers for things like ID values, CSS classes, and JavaScript function names. Be as specific as you determine necessary to prevent a new person to the team from reinventing work.
If you're looking for a quick way to get through your code, try .NET Reflector. It gives you a broad overview of all your classes, methods, properties, etc. so that you can write all the technical documentation you need without actually going through the files. It's super easy to browse through and it will even show you the code itself.
Have you thought about representing what is there with some UML notation? That's what UML is for! If the new developers are good then they should be able to understand it.

Project's documentation when dealing with lots of business-logic rules. How to organize it? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I'm working on quite complicated project, in terms of business-logic quantity and quantity of components.
Each developer mostly works on "his own" component. I understand that this isn't very cross-functional, but it is impossible to know every components' details.
Team sostav changes from time to time. So we have situations when one person have to work on "other person's component". And this can be on periodic basement, so you can come back to the issue a month later - in that moments you can ask component business-logic's owner the same questions again and again, because you simply can forget some tiny but important details a month later.
This situation is annoying sometimes.
We have daily stand-up meetings, when person tells about what he has done and going to do.
We have project's wiki F.A.Q. page - we extract the most frequently asked questions.
What do you think about the problem?
And how would you recommend us to solve it?
given the component nature I'd go with:
1.) A framework document specifying the applications purpose, setup, requirements etc.
2.) Module documents for each component in a common format and indexed by name.
Look at the http://docs.python.org for a good example of general docs and http://docs.python.org/modindex.html for a good example of module/component docs
Oh, and daily meetings are generally bad, they take up a lot of time and answers get forgotten. Newcomers or sick people miss the meetings and have to be re-briefed. It's 100x better to write it all down and keep a paper/email trail unless discussion/feedback is required.