Detailed Notes
In the fast-paced world of software development, coding standards play a crucial role in ensuring that projects run smoothly and effectively. These guidelines help developers maintain code consistency and quality, leading to better collaboration and more efficient workflows. Our recent podcast episode discussed the significance of using coding standards on our developer journey.
Read more ... https://develpreneur.com/coding-standards-understanding-their-importance-in-software-development/
Stay Connected: Join the Developreneur Community
We invite you to join our community and share your coding journey with us. Whether you’re a seasoned developer or just starting, there’s always room to learn and grow together. Contact us at [email protected] with your questions, feedback, or suggestions for future episodes. Together, let’s continue exploring the exciting world of software development.
Additional Resources
* Coding Standards – A Personal Approach (https://develpreneur.com/coding-standards-a-personal-approach/)
* Look More Professional With Personal Coding Standards (https://develpreneur.com/look-more-professional-with-personal-coding-standards/)
* One-Offs, Side Projects, and Veering From Standards (https://develpreneur.com/one-offs-side-projects-and-veering-from-standards/)
* Updating Developer Tools: Keeping Your Tools Sharp and Efficient (https://develpreneur.com/updating-developer-tools-keeping-your-tools-sharp-and-efficient/)
Transcript Text
[Music] okay uh and we're going to click record there we go hello everybody we are back for us we clicked a button and we moved on to the next slide for you it may have taken a while but we were like we had super fast response time let's talk about what are we going to talk about this time so we talked about mockups and clickable demos and wireframes um do you have a thought on what you want something you want to talk about for this coming episode yeah so now that we've talked about the requirements we've talked about kind of the mock UPS a little bit about the design we could go into a design conversation but I think we covered enough information in the previous one with the mockups to just get people where they need to be but one of the things with new projects or build bringing people on is getting people up to speed quickly on the direction that you're going to go with either a framework a technology a programming language whatever to make sure that everyone's on the same page so I I would kind of like to talk on maybe building out uh project templates or putting together like a kind of a POC but a POC of here is One requirement here is the base project structure this is how we are going to build the project in like Java in Python uh or if we're building apis this is what you should do for apis or for if you're doing uh mobile development okay are you going to use xcode are you going to use um the Android developer or are you going to do something that is platform neutral so that that's kind of the thing I would like to throw out there but I'm not sure how to package that um um I sort of like that as development it's basically it's coding standards or development standards and I think talking about what what makes what makes good development standards basically or what are some of the things you consider you should consider as you're doing that I think that's probably not a bad thing because I don't think we've I don't know that we've covered that very often either we've like we've referred to them I think there's actually blog articles somewhere back in the day that we have like example templates and some stuff like that but I think it's not a bad thing to talk about because it is something that um especially these days it seems like teams are more and more you got people coming in and out you got a specialist here or there and you know both sides whether you're part of a team and you need to make sure that it looks consistent or whether you're coming in as a uh you know as a consultant or a specialist or something where it's like you're coming into an existing project you need to do some stuff and get out is you know how do we incorporate development standards so we'll see where it goes this could be something that has a couple follow-ups uh to it as well well hello and welcome back we are continuing our developer journey and we've actually sort of like shifted around where the developer journey is this episode we're going to talk about basically coding standards development standards how do you get the team on the same page when they're doing implementation I and Mike across the the internet here are on the same page and on the same team co-founders of developing who are building better developers my name is Rob Broadhead I'm also a founder of RB Consulting where we help you assess your technology where you at give yourself a starting point find a good like go from point A to point B and find ways to take all your technology through simplification automation integration get that stuff manageable get it maintainable get it scalable and then get you off and running on your road map into the future in the world of good thing and bad thing a bad thing I will go with first is that because it covered it was just in the last episode some people will know some people won't is that a bad thing is starting a conversation on a podcast or something like that and not turning off your notifi so hit your do not disturb if you wonder how it could go I think it's only going to be on the the record on the YouTube side but you can see where we reference one of us did that and or failed to do that and it causes some issues so that's a bad thing is sometimes no matter how many times you do this stuff you do stupid things like that good thing uh let's see a good thing was I have done like it's a little bit of a i' I've done like a spring cleaning kind of thing I've I've gone sort of like my spring cleaning for my systems and servers as a having this consulting company there's multiple servers out there that we maintain some of them are essentially production servers for customers some of them are production servers for our own stuff there's development servers there's demo servers there's all these different things and we rotate through them a lot there's a lot of stuff things like move around and things like that and sometimes that ends up being a pain in the butt because the next thing you know you've got if you're like me you move stuff around because you move it from you have like a uh multiple environments you have a test you have a development you have a production and those are on different machines and different machines have different things going on on them and over time you've got just code all over the place you've got it all in a nice social code repository and stuff like that but you basically it's like going in and playing with all the toys in a kindergarten room and you didn't put your crap away so the good thing is I was able to spend a little bit of time and like put some of that crap away and clean some of that stuff out so now I have like you know much more smoothly running servers because I finally got around to catching up with a little technical debt I know I took too long on that I apologize so I'm going to play Mike to jump in and introduce himself hey everyone my name is Michael MOS I'm one of the co-founders of developing erer I'm also the founder of Envision QA where we help companies unlock their software's potential through a comprehensive software quality assessment review and test Services you know discover how assessing all areas of your software development teams from sales to QA can enhance customer satisfaction and improve software quality right from the initial conversation with your users good and bad well the good sumar situation I have been in the process with my wife of decluttering the house and so I decided to move into my office and start decluttering my office and I probably just got rid of about a thousand CD DVDs that I had stacked up that I have not touched in a decade or so just quickly went through them I did find some pictures that weren't digitized yet um or not stored in a backup somewhere so that was good uh bad side I have so much more to go I've got terabytes of hard drives just sitting around that I still have to go through and figure out what I need what I don't need so like you said it it can get out of hand if you don't keep up with with this I just recently did a similar kind of cleanup and there were I had uh floppy discs three and a half inch floppy discs I had 5 and a qu inch floppy discs I had uh I had the Microsoft developer Network stuff where they used to be able to subscribe and you get all their things so you had office and you had all their development tools and you had all the operating systems and you had all the databases and it was from like the late '90s so I had like Windows 95 Windows 98 windows blah blah blah blah blah blah like I just had I mean there's just big boxes full of CDs or DVDs whatever they were and it was just like okay I guess I can't you know I could I guess I could have tried to donate them somewhere but I don't know who even would even be able to use those so done the same thing this episode we got to continue we finally actually get back to our topic and our topic I totally forgot what our topic was no actually I did a little bit give me a sec our topic is we're going to talk about cing standards there we go sometimes we get really off the rail do not cut that out I think everybody knows that we all sometimes get off track the train goes off the rails and we got to get back on track coding standards so this is something that every one of us I think complains about when it's not followed we also complain about when we have to follow them it's a it is a love hate or a hate hate relationship however you look at it because whenever we walk into a new project we're going to say gosh it looks like 15,000 developers were coding on this there's nothing that makes any sense it doesn't have any Rhyme or Reason you can't find stuff well you know how you fix that problem is you have coding standards you have something that says this is how we are going to name things this is how we're going to lay stuff out this is how we're going to uh even a lot of times you even get in like this is how we're going to approach certain uh usage of like Frameworks and problem solvings and things like that and yes it can be things like uh a code template that says every time you create a class for this language you start with this template and you're going to have a header and you're going to have some footer stuff and you're G to have all these things and this this is what comments look like these are the tags that you should have and all of that stuff is very useful but along those same lines what you it's it's say okay well what do I do do I just like walk through code and say this is how you code everything no what you want to do is you want to make sure that you are going through and essentially like think of it almost like a punch list of if I wanted to set this project up what are the things that I need to do and that's where you're going to get you're going to lay out your development standards your programming standards because this is going to tell people when I'm writing code what should it look like where should it go how does it progress through you know coding testing and all those kinds of things and those are the pieces that you need to have as part of your whether it's your your document or these days it could be part of your cicd flow there are sometimes things you can automate a lot of this you can process processe you can turn into a process a lot of these things that is an automated process of some sort or another some of the things you want to look at and we have talked about these in the past but there are tools like I mentioned there's like cicd kind of stuff continuous integration and deployment there are things out there that can help you force developers into following standards now there are automated tools like uh there are like lint tools and stuff like that there's static code analysis stuff that you can with a lot of in a lot of places you can actually build that into your commit process so it's things like if you do a pull request you can you know you commit your code up then it's going to run through some processing and kick some stuff back and say hey you didn't follow the pro the the code you the coding standards properly there was a guy there was a project I work with that it was so strict that it was things like all of the formatting of the code was built into it so you could not successfully commit code into the Version Control this how old it was it was SVN into SVN without it passing this essentially like sanity check and it did it did like spelling checks it did spacing it did uh it made sure that everything followed the right format so if you you know not to get too deep into it but things like you know do you put something on the same line or do you have to put another if you know a line after every if or do you do a at the end like an open bracket is that on the same line or do you push that to the other line how do you indent do you use tabs do you use spaces all these things that a lot of your Ides will now provide that for you that can be part of it and that's the nice thing about these idees is you can actually build these into IDE properties so you just basically say upload this thing this file and it's going to set all your defaults it can set all your warnings it can set errors and things like that so as a developer they're going to be able to see that hey I am falling out of the standard you also want to make sure that you have the the path of code is also part of your standards besides just the actual coding process that we talk about like writing code and is it you know is it readable blah blah blah is what do I do how do I go from uh a requirement into implementing something thing and then eventually getting it deployed now you may not have all of that as part of your coding standards but these days particularly if you're in an agile environment you actually will or you should you should have PE some sort of a process that's documented or in some way to say hey I am I've grabbed a ticket I'm working on this ticket I'm coding this ticket I've committed code for this ticket it has been tested or like maybe it's I have tests that have been submitted for it it's been tested it's been verified it's been pushed into a release and blah blah blah with all of that there are things like just I mean you can go a little bit nuts but there are things that are important like that like what does depending on how you control your Version Control repositories what does a branch look like when do I Branch when Don I Branch when to you know how what is a what is involved in a a pool requ a pull request and in accepting one and code reviews what does a code review look like how many people need to code do a code review these are all things that I think we we don't think about when we're coming out of school because we don't have teams in that level professional development and a lot of times when we get into the real world we don't think about it because we're so focused on our project our tasks and so it almost has to be the organization or the manager or whoever it is needs to like push that forward with the team as you get further along as you're doing side hustle projects as you're doing maybe getting Consulting and you're jumping in and out then that's one of the first things that you should think about if you're doing your side hustle project is like take notes along the way and craft your you know your coding standard so you have a a template and you've thought about it if you step into something at a customer whether it's a new job or consulting or something like that that should be one of the first questions you ask is are there is there some sort of coding standards document are there templates I need to use and it those kinds of things are going to help you immensely I don't know how often I've walked into something where there's not a standard for example like standard coding structure and so one developer has got all their code in one place and another one's got it another and then they've got all these inii or setting files or whatever they are sometimes it's hardcoded in it all of these paths that then you've got to go and un you know undo those now these days usually people are extract those out to setting files but then it's still it's like okay I got to go tweak all my setting files and I got to figure out which setting I can use and which don't I and when do I can when can I connect to this database when I do I need to connect to my local one those are all factors those are all facets and properties of a good coding standards document or process so I've thrown a lot out there and now I'm going to let Michael sit back there with his big baseball glove and catch all of that and you know play around with a little bit and give us something back that's a little bit more maybe a little bit more intelligible sure one of the things I would like to add on is a coding standard if you're in an agile environment and you're really building your quality controls and your processes within your coding standards it also becomes like a code of conduct for your team everyone agrees to these so when you're doing those code reviews everyone's hold hopefully holding everyone to the same standards that you all agreed to so if you have good quality uh standards Define you should all be following that and then you should hold each other accountable for it so I want to take this a slightly different direction so we've talked about what are good coding standards if you are new to larger Enterprise corporations you're just out of school or you have been working at one company for a long period of time and you're kind of set in your ways based on the coding standards of where you're at going into a new job a new company or even a new side Hustle there are some other things to consider about for coding standards one if you define really good coding standards it doesn't matter what type of development tool you use IDE could be visual code could be xcode doesn't matter if you define The Styling you want you can all these IDs these days can ingest an XML style sheet standard and then apply the same coding styles to whatever ID you use so if you like visual code you can use visual code you like Eclipse you use eclipse xcode and so on the other thing though is so as I was talking about coming into a new job or switching to a different environment one of the things from a new employees perspective is treat your coding standards if you don't have them treat your environment as if it's a new person coming in how are you going to train them on using your system if you have really good coding standards you should almost be able to hand that to them walk through the code walk through the coding standards and boom your employees are quickly up to speed writing code hitting the ground burning within days not weeks or months if you don't have that what typically is going to happen you're going to bring in a new employee you're going to say here go look at how or go look at the application figure out how it works and then we'll slowly have people sit with you and kind of walk through what they do and here's how the code Works here's how we our development environment Etc good coding standards from a new install a new employee perspective you're forced to kind of write that checklist how do I set up my development environment how do I check out my code how is the code style these are some of the basics you need and if you think of it from the mindset of a new employee for training it's so easy because all you literally are doing is you're building your checklist you're walking through how to essentially do your job at this company and you're essentially writing the handbook so to speak in these coding standards now when you get into the continuous integration uh using different Frameworks things of that nature having these kind of templates is very crucial to keeping things moving quickly so if you do a lot of API development a lot of backend development having good standards around what is an API what are the protocols you use how do you resp you know return response messages when do you hide certain response messages so you're not returning critical customer data back to the end user or how do you handle SQL injections you know how do you log into an application how do you pass things there are other things with coding standards that are not just about the basics but also about the functionality within the system how do you handle things you know if you're having to deal with medicine you have to deal with hipop okay how are you applying the Hippa guidelines to your coding standards to ensure you're basically protecting all that patient data and not having logs log you know Social Security numbers or credit card numbers or things of that nature so those are some of the other things that you can unpack within good coding standards and like I said you know as you bring new people on board it's so easy to hand it to them they can get up to speed real quickly or even if you're working across teams if the organization has good coding standards it should be fairly easy to go from one team to work with another team and your project should hopefully integrate smoothly together now a couple of bonuses here uh I want to mention is one these days as mik Michael mentioned it is very it is easier than ever for you to put these standards into your ID whatever it happens to be and effectively hit you know reformat or something like that or look at the the output the we'll call it it's the problems and be able to walk through and see where did you fail to follow the standards another thing that we haven't touched on there's actually a way to maybe make this stuff even easier is through containers or infrastructures of code or something along those lines well yes you can use you can use all of these things you know Docker and all of that and you know k8s and all of those guys you can use all of that to do a very uh an Enterprise System that's got all of these nodes and all this stuff to scale something up what you can also do is you can scale your development environment and this is sometimes a very easy way particularly if you think of like Docker desktop or one of those things where you just say you know what we're going to have you we're going to give you you know a Docker compos just a little yaml file and you go launch that thing and it goes out it grabs all the code down from you know from whatever your repository was sets everything up puts it in all the right folders and everything else and it's just like that's where you live you can try to copy stuff out and have your own separate development environment but really you live there and it's so much easier for developers to do that it's actually makes it a lot easier if you are a if you're in a a team where you're you know you've got multiple members and you especially if you've got people sort of flowing in and out or if you've got people just going to work on something for a while and then they need to be done and you move you know move on to something else you don't have to spin up machines you don't have to even spin up your own VMS you can can just say here take this install Docker execute this thing it's going to run here you go boom everything's going to be the same you're you're able to say here's where we're at and at least your your infrastruct your structure and a lot of that those kinds of things that become a pain things like uh even things like the the system setup so what are my system settings what's my time zone what are like those kinds of things particularly if you're dealing with uh web development for example like what Ser what version or actually almost any of development these states what version of all of these libraries and all these Frameworks am I dealing with and you know I mean you're sitting there probably pulling your hair out if you've done like a react app that's got 18 different or that's actually a small one it's got like 40 different you know modules in it or python that's got a you know a requirements. text that's like a 100 lines long or if you're dealing with Java and you've got all these imported little libraries or you deal like Ruby if you got all of the gems and all that kind of stuff it is so much easier to just have that environment particularly when you start dealing with like upgrading and things of that nature because then you can just do it once get it fixed get it working and then just go here you go here's the environment knock yourself out it allows you to really focus on the configuration types of things that take up so much of our time you can just get that done and knock that out of the the the list of things that you have to worry about as far as a developer closing thoughts from you yeah I'm glad you brought that up because I have actually built that and I've talked about that in Prior podcast where we have built custom development environments and we essentially rolled it out as either images for desktops or containers and so on only caveat with that and this will be my final thought is if you're going to go the automated route and use containers or automation make sure you document and standardize what it is that you're going to be doing with that I have been in situations and in couple different companies where they didn't have a standard for that someone implemented it a year or two ago they left and now no one knows how it works it starts becoming unstable and then you actually spend more time trying to keep your development environment up versus actually doing your job so again coding standards help with all of this standardization is key regardless it could be for continuous integration how your code styling is but just make sure you do document whatever you agree to do and that's I know everybody hates to use the dword but yes document that stuff um it's and honestly even if you've got something if you these kind of situation if you get into like you know automated environments and things like that then just just make sure that youve got something that says here's the scripts that you run and just make sure that you don't have magic stuff in those scripts I have dealt with those I've been in the same situation where you've got the developer disappeared long ago and particularly I'll just throw one extra one example up and then we'll out there and we'll run you know we'll move on we'll pass move off of our our our Soap Box on this but it was a combination so you had these containers that built up your environment and it wasn't a it wasn't a simple environment there was three or four servers involved and there was a jenin server that was involved that did some of the building to some of this stuff and those things had to be in sync and there was some calls back and forth that if you didn't have everything in place it didn't really make sense and those are the things that you need to make sure for example like if there's a like settings files that are required or if there's path that's probably the one I've seen more often than not is there's path or environment variables that are expected to be there and if they're not it Just close up so make sure that you know you document it make sure that you have proper error codes and make sure that you've got ideally that you've got a document or a video or something that says this is how you walk through the process and what it should look like those are the kinds of things are going to save other people in the future even if you walk away you can just say hey that document if you walk through that it should work if it doesn't then something went wrong and of course the nice thing is you can test that by just give that document to somebody and say okay just take this or do it yourself I've done this several times when I build those documents I go to a completely clean machine walk through the steps and if it doesn't work then I got to fix it or I've got to update the document you if you don't think that we work can update the document of us by sending us an email at info developer.com yes that is quite a stretch to get to that but we got there anyways just like however far you have to go to get to the internet which shouldn't be very far go out to developer.com and you can check out all of our content you can go to school. developer.com and check out the more organized content that's there you can leave us comments you can leave us suggestions and wide open on that whether you want to look at some of the topics we should cover some of the things we shouldn't cover some of the things that you'd like us to go back and do as part of our uh our mentoring series or part of our training type series you name it we're we're more than happy to hear from you and see where we can use this platform so help us help you become a better developer as always though I want to go out there and become a better developer better human being even have yourself a great day a great week and we will talk to you next time bonus material yeah so you talked a little bit about linting and you know code review software and tools a static code analysis and that um sonar is one of the best uh sonar lint uh especially in the Java world I think there's even a python lint um but pick one start using it just by a static code analysis tool from the get-go will start heading you down the path to good requirements the other thing is pick a style pick it and apply it to everybody because I can't tell you how frustrating it is for you to go in check out code and the moment you hit save all your code reformats because you're on a different standard as someone else when you go to commit your code you now have hundreds of file changes out there and it's all formatting so you don't know what it is that the code change was actually for so pick one and if you don't have one do it now do one build or one commit for all your projects to the same format just push it up apply it and then going forward you should be on the same page and it should be easier to do those code reviews make changes and see what actually changed that is a huge bonus that part of just the the headaches that will save you for code commits like code merges and code comparisons is just insane I don't know how many times I've been and I'm thinking way like I've got flashbacks to back in the day when everybody had stuff different and that was actually what early on way way back what I liked about like pythons and borrans and stuff like that where it was all like it had to be lined up the right way or it wouldn't work because then at least you could eat you could connect you could actually compare stuff like I remember taking like the all green and white printer paper and you like take two those sheets and just look at it through the light and it either lines up or it doesn't and you can figure out where the changes are I do want to actually just another bonus thing I want to go back to the idea of having a having a virtual environment whether it is a you know whether it's a Docker image or something something like that one of the first times even if it's just you one of the first times I really did this um is I used was actually going through one of the developer or U one of the training things and I can't remember I think it was actually a python one where I used Cloud9 I used Amazon's Cloud9 I had ec2 server that I just had my stuff on and no matter what machine I was on I would get on that and everything was there I didn't you know I have all kinds of ways to sync code and I can commit stuff up and I can bring it back down and all that kinds of stuff but then sometimes you know the push didn't go right or whatever and just having a a very very consistent environment and I've gotten this like I said with Docker as well where it's just like I'm always I'm going to pop the the document the docker image up do all the work commit it when you know next time I go fire that up somewhere else it pulls everything down everything gets synced having that alone even if you're the only de developer does save sometimes hours and hours of time if you particularly for example Apple just had an update the other day I've got one machine that took the new iOS and I've got another one that hasn't taken it yet because I'm I just haven't been ready I've been a little scared to do it uh because I want to make sure the first one worked right but then it it I lost some time because there was stuff that's like oh yeah I got to reset I got to do this I got to do that thing I got do that thing I would not have had to do that because this blew up or change links that broke my development environment if I was sitting in a you know some sort of container I wouldn't have had to worry about that so I think that's more than enough right now we've given you too many bonuses but I'm G but there's one more now how much would you pay Michael throw us one more out there well in addition to the container so if you go to like launching your internet business that we have out there if you deal with like WordPress this is a really good example like Rob you can go download a WordPress container set up your WordPress development environment put everything in there get it all working and then you can use your tools the backup tools like WP uh import or export to export your entire uh WordPress site go out to your production site it's a simple import you don't touch anything else so sometimes these containers allow you for the push key the turnkey solutions to really speed up your continuous integration and I I did use that one specifically I had a customer that we were just doing some some custom stuff to some you know custom plugins and and thing and pages and things like that in WordPress and it was so nice I started to do it in a in a separate instance somewhere and was going to just spin up a little server and do it but there was just there's so much related to that that I didn't have to deal with when I went to Docker not to mention the fact that it was just like I could you know edit all the code right there I could see it everything was awesome that is is actually like that's that is a good little bonus bonus bonus kind of thing for you to look at we've given you too much already you owe us at least an email just even if it's just to say hey I appreciate this or I didn't appreciate you gave me too much stop giving me bonus material shoot us an info@ developer.com email let us know what you think what your feedback are provide us comments here uh subscribe all that kind of good Stu you can like and all that kind of other stuff as well really we just want to like hear from you what do you like what do you want where can we go to give you more information that will help you grow as a developer we got a lot ahead of us as we get into the next season we're getting closer to the end of this one so we will soon wrap up this developer journey and dive into those next things where we're going to start talking about like really some actionable kinds of things some acorns that you can walk away with every single episode and say wow I'm going to I've got this challenge that I'm going to work on I've got this new thing I'm going to do and I'm going to see how it goes for a while and and we'll see if you aren't a much much better developer by the time we get done with that that being said we can wrap this one up finally and uh we're going to go off and ride off into the sunset but we'll be right here soon as you turn around if you looked at this you know if you're looking at this a past catch up there's a lot of episodes ahead of you I'm sure if not then we'll see you next time go out there have yourself a great day a great week and we will talk to you next time [Music]
Transcript Segments
[Music]
okay uh and we're going to click record
there we go hello everybody we are back
for us we clicked a button and we moved
on to the next slide for you it may have
taken a while but we were like we had
super fast response time let's talk
about what are we going to talk about
this time so we talked about mockups and
clickable demos and
wireframes um do you have a thought on
what you want something you want to talk
about for this coming episode yeah so
now that we've talked about the
requirements we've talked about kind of
the mock UPS a little bit about the
design we could go into a design
conversation but I think we covered
enough information in the previous one
with the mockups to just get people
where they need to be but one of the
things with new projects or build
bringing people on is getting people up
to speed quickly on the direction that
you're going to go with either a
framework a technology a programming
language whatever to make sure that
everyone's on the same page so I I would
kind of like to talk on maybe building
out uh project templates or putting
together like a kind of a POC but a POC
of here is One requirement here is the
base project structure this is how we
are going to build the project in like
Java in Python uh or if we're building
apis this is what you should do for apis
or for
if you're doing uh mobile development
okay are you going to use xcode are you
going to use um the Android developer or
are you going to do something that is
platform neutral so that that's kind of
the thing I would like to throw out
there but I'm not sure how to package
that um um I sort of like that as
development it's basically it's coding
standards or development standards and I
think talking about
what what makes
what makes good development standards
basically or what are some of the things
you consider you should consider as
you're doing that I think that's
probably not a bad thing because I don't
think we've I don't know that we've
covered that very often either we've
like we've referred to them I think
there's actually blog articles somewhere
back in the day that we have like
example templates and some stuff like
that but I think it's not a bad thing to
talk about because it is something that
um especially these days it seems like
teams are more and more you got people
coming in and out you got a specialist
here or there and you know both sides
whether you're part of a team and you
need to make sure that it looks
consistent or whether you're coming in
as a uh you know as a consultant or a
specialist or something where it's like
you're coming into an existing project
you need to do some stuff and get out is
you know how do we incorporate
development standards so we'll see where
it goes this could be something that has
a couple follow-ups uh to it as
well well hello and welcome back we are
continuing our developer journey and
we've actually sort of like shifted
around where the developer journey is
this episode we're going to talk about
basically coding standards development
standards how do you get the team on the
same page when they're doing
implementation I and Mike across the the
internet here are on the same page and
on the same team co-founders of
developing who are building better
developers my name is Rob Broadhead I'm
also a founder of RB Consulting where we
help you assess your technology where
you at give yourself a starting point
find a good like go from point A to
point B and find ways to take all your
technology through simplification
automation integration get that stuff
manageable get it maintainable get it
scalable and then get you off and
running on your road map into the future
in the world of good thing and bad thing
a bad thing I will go with first is that
because it covered it was just in the
last episode some people will know some
people won't is that a bad thing is
starting a conversation on a podcast or
something like that and not turning off
your notifi so hit your do not disturb
if you wonder how it could go I think
it's only going to be on the the record
on the YouTube side but you can see
where we reference one of us did that
and or failed to do that and it causes
some issues so that's a bad thing is
sometimes no matter how many times you
do this stuff you do stupid things like
that good
thing uh let's see a good thing was
I have done like it's a little bit of a
i' I've done like a spring cleaning kind
of thing I've I've gone sort of like my
spring cleaning for my systems and
servers as a having this consulting
company there's multiple servers out
there that we maintain some of them are
essentially production servers for
customers some of them are production
servers for our own stuff there's
development servers there's demo servers
there's all these different things and
we rotate through them a lot there's a
lot of stuff things like move around and
things like that
and sometimes that ends up being a pain
in the butt because the next thing you
know you've got if you're like me you
move stuff around because you move it
from you have like a uh multiple
environments you have a test you have a
development you have a production and
those are on different machines and
different machines have different things
going on on them and over time you've
got just code all over the place you've
got it all in a nice social code
repository and stuff like that but you
basically it's like going in and playing
with all the toys in a kindergarten room
and you didn't put your crap away so the
good thing is I was able to spend a
little bit of time and like put some of
that crap away and clean some of that
stuff out so now I have like you know
much more smoothly running servers
because I finally got around to catching
up with a little technical debt I know I
took too long on that I apologize so I'm
going to play Mike to jump in and
introduce
himself hey everyone my name is Michael
MOS I'm one of the co-founders of
developing erer I'm also the founder of
Envision QA where we help companies
unlock their software's potential
through a comprehensive software quality
assessment review and test Services you
know discover how assessing all areas of
your software development teams from
sales to QA can enhance customer
satisfaction and improve software
quality right from the initial
conversation with your users good and
bad well the good sumar situation I have
been in the process with my wife of
decluttering the house and so I decided
to move into my office and start
decluttering my office and I probably
just got rid of about a thousand CD DVDs
that I had stacked up that I have not
touched in a decade or so just quickly
went through them I did find some
pictures that weren't digitized yet um
or not stored in a backup somewhere so
that was good uh bad side I have so much
more to
go I've got terabytes of hard drives
just sitting around that I still have to
go through and figure out what I need
what I don't need so like you said it it
can get out of hand if you don't keep up
with with this I just recently did a
similar kind of cleanup and there were I
had uh floppy discs three and a half
inch floppy discs I had 5 and a qu inch
floppy discs I had uh I had the
Microsoft developer Network stuff where
they used to be able to subscribe and
you get all their things so you had
office and you had all their development
tools and you had all the operating
systems and you had all the databases
and it was from like the late '90s so I
had like Windows 95 Windows 98 windows
blah blah blah blah blah blah like I
just had I mean there's just big boxes
full of CDs or DVDs whatever they were
and it was just like okay I guess I
can't you know I could I guess I could
have tried to donate them somewhere but
I don't know who even would even be able
to use those so done the same thing this
episode we got to continue we finally
actually get back to our topic and our
topic I totally forgot what our topic
was no actually I did a little bit give
me a sec our topic is we're going to
talk
about cing standards there we go
sometimes we get really off the rail do
not cut that out I think everybody knows
that we all sometimes get off track the
train goes off the rails and we got to
get back on track coding standards so
this is something that every one of us I
think complains about when it's not
followed we also complain about when we
have to follow them it's a it is a love
hate or a hate hate relationship however
you look at it because whenever we walk
into a new project we're going to say
gosh it looks like 15,000 developers
were coding on this there's nothing that
makes any sense it doesn't have any
Rhyme or Reason you can't find stuff
well you know how you fix that problem
is you have coding standards you have
something that says this is how we are
going to name things this is how we're
going to lay stuff out this is how we're
going to uh even a lot of times you even
get in like this is how we're going to
approach certain uh usage of like
Frameworks and problem solvings and
things like that and yes it can be
things like uh a code template that says
every time you create a class for this
language you start with this template
and you're going to have a header and
you're going to have some footer stuff
and you're G to have all these things
and this this is what comments look like
these are the tags that you should have
and all of that stuff is very
useful but along those same lines what
you it's it's say okay well what do I do
do I just like walk through code and say
this is how you code everything no what
you want to do is you want to make sure
that you are going through and
essentially like think of it almost like
a punch list of if I wanted to set this
project up what are the things that I
need to
do and that's where you're going to get
you're going to lay out your development
standards your programming standards
because this is going to tell people
when I'm writing code what should it
look like where should it go how does it
progress through you know coding testing
and all those kinds of things and those
are the pieces that you need to have as
part of your whether it's your your
document or these days it could be part
of your cicd flow there are sometimes
things you can automate a lot of this
you can process processe you can turn
into a process a lot of these things
that is an automated process of some
sort or another some of the things you
want to look at and we have talked about
these in the past but there are tools
like I mentioned there's like cicd kind
of stuff continuous integration and
deployment there are things out there
that can help you force developers into
following standards now there are
automated tools like uh there are like
lint tools and stuff like that there's
static code analysis stuff that you can
with a lot of in a lot of places you can
actually build that into your commit
process so it's things like if you do a
pull request you can you know you commit
your code up then it's going to run
through some processing and kick some
stuff back and say hey you didn't follow
the pro the the code you the coding
standards properly there was a guy there
was a project I work with that it was so
strict that it was things like all of
the formatting of the code was built
into it so you could not successfully
commit code into the Version Control
this how old it was it was SVN into SVN
without it passing this essentially like
sanity check and it did it did like
spelling checks it did spacing it did uh
it made sure that everything followed
the right format so if you you know not
to get too deep into it but things like
you know do you put something on the
same line or do you have to put another
if you know a line after every if or do
you do a at the end like an open bracket
is that on the same line or do you push
that to the other line how do you indent
do you use tabs do you use spaces all
these things that a lot of your Ides
will now provide that for
you that can be part of it and that's
the nice thing about these idees is you
can actually build these into IDE
properties so you just basically say
upload this thing this file and it's
going to set all your defaults it can
set all your warnings it can set errors
and things like that so as a developer
they're going to be able to see that hey
I am falling out of the standard you
also want to make sure that you have the
the path of code is also part of your
standards besides just the actual coding
process that we talk about like writing
code and is it you know is it readable
blah blah blah is what do I do how do I
go from uh a requirement into
implementing something thing and then
eventually getting it deployed now you
may not have all of that as part of your
coding standards but these days
particularly if you're in an agile
environment you actually will or you
should you should have PE some sort of a
process that's documented or in some way
to say hey I am I've grabbed a ticket
I'm working on this ticket I'm coding
this ticket I've committed code for this
ticket it has been tested or like maybe
it's I have tests that have been
submitted for it it's been tested it's
been verified it's been pushed into a
release and blah blah blah with all of
that there are things like just I mean
you can go a little bit nuts but there
are things that are important like that
like what does depending on how you
control your Version Control
repositories what does a branch look
like when do I Branch when Don I Branch
when to you know how what is a what is
involved in a a pool requ a pull request
and in accepting one and code reviews
what does a code review look like how
many people need to code do a code
review these are all things that I think
we we don't think about when we're
coming out of school because we don't
have teams in that level professional
development and a lot of times when we
get into the real world we don't think
about it because we're so focused on our
project our tasks and so it almost has
to be the organization or the manager or
whoever it is needs to like push that
forward with the team as you get further
along as you're doing side hustle
projects as you're doing maybe getting
Consulting and you're jumping in and out
then that's one of the first things that
you should think about if you're doing
your side hustle project is like take
notes along the way and craft your you
know your coding standard so you have a
a template and you've thought about it
if you step into something at a customer
whether it's a new job or consulting or
something like that that should be one
of the first questions you ask is are
there is there some sort of coding
standards document are there templates I
need to use and it those kinds of things
are going to help you immensely I don't
know how often I've walked into
something where there's not a standard
for example like standard coding
structure and so one developer has got
all their code in one place and another
one's got it another and then they've
got all these inii or setting files or
whatever they are sometimes it's
hardcoded in it all of these paths that
then you've got to go and un you know
undo those now these days usually people
are extract those out to setting files
but then it's still it's like okay I got
to go tweak all my setting files and I
got to figure out which setting I can
use and which don't I and when do I can
when can I connect to this database when
I do I need to connect to my local one
those are all factors those are all
facets and properties of a good coding
standards document or process so I've
thrown a lot out there and now I'm going
to let Michael sit back there with his
big baseball glove and catch all of that
and you know play around with a little
bit and give us something back that's a
little bit more maybe a little bit more
intelligible sure one of the things I
would like to add on is a coding
standard if you're in an agile
environment and you're really building
your quality controls and your processes
within your coding standards it also
becomes like a code of conduct for your
team everyone agrees to these so when
you're doing those code reviews
everyone's hold hopefully holding
everyone to the same standards that you
all agreed to so if you have good
quality uh standards Define you should
all be following that and then you
should hold each other accountable for
it so I want to take this a slightly
different direction so we've talked
about what are good coding standards if
you are new to larger Enterprise
corporations you're just out of school
or you have been working at one company
for a long period of time and you're
kind of set in your ways based on the
coding standards of where you're
at going into a new job a new company or
even a new side Hustle there are some
other things to consider about for
coding standards one if you define
really good coding standards it doesn't
matter what type of development tool you
use IDE could be visual code could be
xcode doesn't matter if you define The
Styling you want you can all these IDs
these days can ingest an XML style sheet
standard and then apply the same coding
styles to whatever ID you use so if you
like visual code you can use visual code
you like Eclipse you use eclipse xcode
and so on the other thing though is so
as I was talking about coming into a new
job or switching to a different
environment one of the things from a new
employees perspective is treat your
coding standards if you don't have them
treat your environment as if it's a new
person coming in how are you going to
train them on using your system if you
have really good coding standards you
should almost be able to hand that to
them walk through the code walk through
the coding standards and boom your
employees are quickly up to speed
writing code hitting the ground burning
within days not weeks or
months if you don't have that what
typically is going to happen you're
going to bring in a new employee you're
going to say here go look at how or go
look at the application figure out how
it works and then we'll slowly have
people sit with you and kind of walk
through what they do and here's how the
code Works here's how we our development
environment Etc good coding standards
from a new install a new employee
perspective you're forced to kind of
write that checklist how do I set up my
development environment how do I check
out my code how is the code style these
are some of the basics you need and if
you think of it from the mindset of a
new employee for
training it's so easy because all you
literally are doing is you're building
your checklist you're walking through
how to essentially do your job at this
company and you're essentially writing
the handbook so to speak in these coding
standards now when you get into the
continuous integration uh using
different Frameworks things of that
nature having these kind of templates is
very crucial to keeping things moving
quickly so if you do a lot of API
development a lot of backend development
having good standards around what is an
API what are the protocols you use how
do you resp you know return response
messages when do you hide certain
response messages so you're not
returning critical customer data back to
the end user or how do you handle SQL
injections you know how do you log into
an application how do you pass things
there are other things with coding
standards that are not just about the
basics but also about the functionality
within the system how do you handle
things you know if you're having to deal
with medicine you have to deal with
hipop okay how are you applying the
Hippa guidelines to your coding
standards to ensure you're basically
protecting all that patient data and not
having logs log you know Social Security
numbers or credit card numbers or things
of that nature so those are some of the
other things that you can unpack within
good coding standards and like I said
you know as you bring new people on
board it's so easy to hand it to them
they can get up to speed real quickly or
even if you're working across teams if
the organization has good coding
standards it should be fairly easy to go
from one team to work with another team
and your project should hopefully
integrate smoothly
together now a couple of bonuses here uh
I want to mention is one these days as
mik Michael mentioned it is very it is
easier than ever for you to put these
standards into your ID whatever it
happens to be and effectively hit you
know reformat or something like that or
look at the the output the we'll call it
it's the problems and be able to walk
through and see where did you fail to
follow the standards another thing that
we haven't touched on there's actually a
way to maybe make this stuff even easier
is through containers or infrastructures
of code or something along those lines
well yes you can use you can use all of
these things you know Docker and all of
that and you know k8s and all of those
guys you can use all of that to do a
very uh an Enterprise System that's got
all of these nodes and all this stuff to
scale something up what you can also do
is you can scale your development
environment and this is sometimes a very
easy way particularly if you think of
like Docker desktop or one of those
things where you just say you know what
we're going to have you we're going to
give you you know a Docker compos just a
little yaml file and you go launch that
thing and it goes out it grabs all the
code down from you know from whatever
your repository was sets everything up
puts it in all the right folders and
everything else and it's just like
that's where you live you can try to
copy stuff out and have your own
separate development environment but
really you live there and it's so much
easier for developers to do that it's
actually makes it a lot easier if you
are a if you're in a a team where you're
you know you've got multiple members and
you especially if you've got people sort
of flowing in and out or if you've got
people just going to work on something
for a while and then they need to be
done and you move you know move on to
something else you don't have to spin up
machines you don't have to even spin up
your own VMS you can can just say here
take this install Docker execute this
thing it's going to run here you go boom
everything's going to be the same you're
you're able to say here's where we're at
and at least your your infrastruct your
structure and a lot of that those kinds
of things that become a pain things like
uh even things like the the system setup
so what are my system settings what's my
time zone what are like those kinds of
things particularly if you're dealing
with uh web development for example like
what Ser what version or actually almost
any of development these states what
version of all of these libraries and
all these Frameworks am I dealing with
and you know I mean you're sitting there
probably pulling your hair out if you've
done like a react app that's got 18
different or that's actually a small one
it's got like 40 different you know
modules in it or python that's got a you
know a requirements. text that's like a
100 lines long or if you're dealing with
Java and you've got all these imported
little libraries or you deal like Ruby
if you got all of the gems and all that
kind of
stuff it is so much easier to just have
that environment particularly when you
start dealing with like upgrading and
things of that nature because then you
can just do it once get it fixed get it
working and then just go here you go
here's the environment knock yourself
out it allows you to really focus on the
configuration types of things that take
up so much of our time you can just get
that done and knock that out of the the
the list of things that you have to
worry about as far as a developer
closing thoughts from
you yeah I'm glad you brought that up
because I have actually built that and
I've talked about that in Prior podcast
where we have built custom development
environments and we essentially rolled
it out as either images for desktops or
containers and so on only caveat with
that and this will be my final thought
is if you're going to go the automated
route and use containers or automation
make sure you document and standardize
what it is that you're going to be doing
with that I have been in situations and
in couple different companies where they
didn't have a standard for that someone
implemented it a year or two ago they
left and now no one knows how it works
it starts becoming unstable and then you
actually spend more time trying to keep
your development environment up versus
actually doing your job so again coding
standards help with all of this
standardization is key regardless it
could be for continuous integration how
your code styling is but just make sure
you do document whatever you agree to
do and that's I know everybody hates to
use the dword but yes document that
stuff um it's and honestly even if
you've got something if you these kind
of situation if you get into like you
know automated environments and things
like that then just just make sure that
youve got something that says here's the
scripts that you run and just make sure
that you don't have magic stuff in those
scripts I have dealt with those I've
been in the same situation where you've
got the developer disappeared long ago
and
particularly I'll just throw one extra
one example up and then we'll out there
and we'll run you know we'll move on
we'll pass move off of our our our Soap
Box on this but it was a combination so
you had these containers that built up
your environment and it wasn't a it
wasn't a simple environment there was
three or four servers involved and there
was a jenin server that was involved
that did some of the building to some of
this
stuff and those things had to be in sync
and there was some calls back and forth
that if you didn't have everything in
place it didn't really make sense and
those are the things that you need to
make sure for example like if there's a
like settings files that are required or
if there's path that's probably the one
I've seen more often than not is there's
path or environment variables that are
expected to be there and if they're not
it Just close up so make sure that you
know you document it make sure that you
have proper error codes and make sure
that you've got ideally that you've got
a document or a video or something that
says this is how you walk through the
process and what it should look like
those are the kinds of things are going
to save other people in the future even
if you walk away you can just say hey
that document if you walk through that
it should work if it doesn't then
something went wrong and of course the
nice thing is you can test that by just
give that document to somebody and say
okay just take this or do it yourself
I've done this several times when I
build those documents I go to a
completely clean machine walk through
the steps and if it doesn't work then I
got to fix it or I've got to update the
document you if you don't think that we
work can update the document of us by
sending us an email at info
developer.com yes that is quite a
stretch to get to that but we got there
anyways just like however far you have
to go to get to the internet which
shouldn't be very far go out to
developer.com and you can check out all
of our content you can go to school.
developer.com and check out the more
organized content that's there you can
leave us comments you can leave us
suggestions and wide open on that
whether you want to look at some of the
topics we should cover some of the
things we shouldn't cover some of the
things that you'd like us to go back and
do as part of our uh our mentoring
series or part of our training type
series you name it we're we're more than
happy to hear from you and see where we
can use this platform so help us help
you become a better
developer as always though I want to go
out there and become a better developer
better human being even have yourself a
great day a great week and we will talk
to you next time bonus
material yeah so you talked a little bit
about linting and you know code review
software and tools a static code
analysis and that um sonar is one of the
best uh sonar lint uh especially in the
Java world I think there's even a python
lint um but pick one start using it just
by a static code analysis tool from the
get-go will start heading you down the
path to good requirements the other
thing is pick a style pick it and apply
it to everybody
because I can't tell you how frustrating
it is for you to go in check out code
and the moment you hit save all your
code reformats because you're on a
different standard as someone else when
you go to commit your code you now have
hundreds of file changes out there and
it's all formatting so you don't know
what it is that the code change was
actually for so pick one and if you
don't have one do it now do one build or
one commit for all your projects to the
same format just push it up apply it and
then going forward you should be on the
same page and it should be easier to do
those code reviews make changes and see
what actually
changed that is a huge bonus that part
of just
the the headaches that will save you for
code commits like code merges and code
comparisons is just insane I don't know
how many times I've been and I'm
thinking way like I've got flashbacks to
back in the day when everybody had stuff
different and that was actually what
early on way way back what I liked about
like pythons and borrans and stuff like
that where it was all like it had to be
lined up the right way or it wouldn't
work because then at least you could eat
you could connect you could actually
compare stuff like I remember taking
like the all green and white printer
paper and you like take two those sheets
and just look at it through the light
and it either lines up or it doesn't and
you can figure out where the changes are
I do want to actually just another bonus
thing I want to go back to the idea of
having a having a virtual environment
whether it is a you know whether it's a
Docker image or something something like
that one of the first times even if it's
just you one of the first times I really
did this um is I used was actually going
through one of the developer or U one of
the training things and I can't remember
I think it was actually a python one
where I used Cloud9 I used Amazon's
Cloud9 I had ec2 server that I just had
my stuff on and no matter what machine I
was on I would get on that and
everything was there I didn't you know I
have all kinds of ways to sync code and
I can commit stuff up and I can bring it
back down and all that kinds of stuff
but then sometimes you know the push
didn't go right or whatever and just
having a a very very consistent
environment and I've gotten this like I
said with Docker as well where it's just
like I'm always I'm going to pop the the
document the docker image
up do all the work commit it when you
know next time I go fire that up
somewhere else it pulls everything down
everything gets synced having that alone
even if you're the only de developer
does save sometimes hours and hours of
time if you particularly for example
Apple just had an update the other day
I've got one machine that took the new
iOS and I've got another one that hasn't
taken it yet because I'm I just haven't
been ready I've been a little scared to
do it uh because I want to make sure the
first one worked right but then it it I
lost some time because there was stuff
that's like oh yeah I got to reset I got
to do this I got to do that thing I got
do that thing I would not have had to do
that because this blew up or change
links that broke my development
environment if I was sitting in a you
know some sort of container I wouldn't
have had to worry about that so I think
that's more than enough right now we've
given you too many bonuses but I'm G but
there's one more now how much would you
pay Michael throw us one more out there
well in addition to the container so if
you go to like launching your internet
business that we have out there if you
deal with like WordPress this is a
really good example like Rob you can go
download a WordPress container set up
your WordPress development environment
put everything in there get it all
working and then you can use your tools
the backup tools like WP uh import or
export to export your entire uh
WordPress site go out to your production
site it's a simple import you don't
touch anything
else so sometimes these containers allow
you for the push key the turnkey
solutions to really speed up your
continuous integration and I I did use
that one specifically I had a customer
that we were just doing some some custom
stuff to some you know custom plugins
and and thing and pages and things like
that in WordPress and it was so nice I
started to do it in a in a separate
instance somewhere and was going to just
spin up a little server and do it but
there was just there's so much related
to that that I didn't have to deal with
when I went to Docker not to mention the
fact that it was just like I could you
know edit all the code right there I
could see it everything was awesome that
is is actually like that's that is a
good little bonus bonus bonus kind of
thing for you to look at we've given you
too much already you owe us at least an
email just even if it's just to say hey
I appreciate this or I didn't appreciate
you gave me too much stop giving me
bonus material shoot us an info@
developer.com email let us know what you
think what your feedback are provide us
comments here uh subscribe all that kind
of good Stu you can like and all that
kind of other stuff as well really we
just want to like hear from you what do
you like what do you want where can we
go to give you more information that
will help you grow as a developer we got
a lot ahead of us as we get into the
next season we're getting closer to the
end of this one so we will soon wrap up
this developer journey and dive into
those next things where we're going to
start talking about like really some
actionable kinds of things some acorns
that you can walk away with every single
episode and say wow I'm going to I've
got this challenge that I'm going to
work on I've got this new thing I'm
going to do and I'm going to see how it
goes for a while and and we'll see if
you aren't a much much better developer
by the time we get done with that that
being said we can wrap this one up
finally and uh we're going to go off and
ride off into the sunset but we'll be
right here soon as you turn around if
you looked at this you know if you're
looking at this a past catch up there's
a lot of episodes ahead of you I'm sure
if not then we'll see you next time go
out there have yourself a great day a
great week and we will talk to you next
time
[Music]