•   
  •   
  •   

Technology Stack Overflow developers: We didn't always follow coding best practices, and you don't have to either

12:35  03 april  2021
12:35  03 april  2021 Source:   techrepublic.com

Browser wars: What I learned after fighting this battle for decades

  Browser wars: What I learned after fighting this battle for decades Jack Wallen describes how web browser developers and website developers could work together to end the browser wars.At this moment, I have 11 web browsers installed on my production desktop. Not one, not two, not five--11. How did I get here? How did I arrive at a moment where I have far too many web browsers installed? It's been a journey. Let me explain.

Best practices can slow your code down. Which is why Stack Overflow 's development team decided not to follow them. IMAGE: iStock/metamorworks. Best practices are there for a reason. In software engineering, they're usually designed to make code easy to maintain, as well as ensure Arcoverde and Donovan have worked on Stack Overflow since it launched in 2009, back when the website ran on just a handful of dedicated servers. The site's small team quickly found itself having to scale-up the platform in order to meet demand, while at the same time trying to keep Stack Overflow fast and light.

Stack Overflow for Teams is a private, secure spot for you and your coworkers to find and share information. I want to understand if the following coding practice is good or bad practice . I pass a Value Object to a method as a parameter and the called method is returning the same parameter Value Object.

Best practices are there for a reason. In software engineering, they're usually designed to make code easy to maintain, as well as ensure developers don't make any mistakes that could lead to bigger issues down the line.

a person using a laptop computer sitting on top of a table: IMAGE: iStock/metamorworks © Provided by TechRepublic IMAGE: iStock/metamorworks

But that doesn't mean developers always need to stick to them. When building the codebase for Stack Overflow, for instance, engineers Roberta Arcoverde and Ryan Donovan admit that they sometimes sacrificed best practices in favor of speed and performance – and explain that following established rules to the letter aren't always the best choice for all projects.

Zoom says video meetings will be a core part of the 'new normal'

  Zoom says video meetings will be a core part of the 'new normal' Zoom is offering the video component of its platform as 'infrastructure,' upon which developers can build their own enterprise applications.Zoom has launched new tools for developers as it looks to move beyond basic video meetings and embed its platform into enterprise applications.

Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers. Jobs Programming & related technical career opportunities. "If you create a new conda environment while VS Code is running, use the Reload Window command to refresh the environment list shown with Python: Select Interpreter; otherwise you may not see the environment there. It might take a short time to appear; if you don ' t see it at first, wait 15 seconds then try using the command again."

I consider this to be a good practice because it allows the compiler to check that the identifier is used as I expect (e.g. it is not mutated). On the other hand it clutters up the code , and perhaps this is not "the Java way". I am wondering if there is a generally accepted best practice regarding the non-required use of final variables, and if there are other tradeoffs or aspects to this discussion that My first lazy read had me think you were saying it was easier to use an existing method because you didn ' t have to worry about the method changing anything, which made no sense as finial doesn' t protect against that.

Must-read developer content

  • The essential 10 programming languages developers need to know this year
  • Raspberry Pi and Visual Studio Code: A great combination
  • A 6 year old became the world's youngest computer programmer
  • Rust: What developers need to know about this programming language (free PDF)
a person using a laptop computer sitting on top of a table © IMAGE: iStock/metamorworks

Arcoverde and Donovan have worked on Stack Overflow since it launched in 2009, back when the website ran on just a handful of dedicated servers. The site's small team quickly found itself having to scale-up the platform in order to meet demand, while at the same time trying to keep Stack Overflow fast and light.

"Because we went with the reliability of a full Microsoft stack—.NET, C#, and MSSQL—our costs grew with the number of instances. Each server required a new license. Our scaling strategy was to scale up, not scale out," Arcoverde and Donovan explained in a blog post.

Best Online Learning Platforms of 2021

  Best Online Learning Platforms of 2021 The internet is filled to the brim with learning opportunities for those who want to learn on their own time. Some online learning, or e-learning, services focus on traditional mediums like science, math and coding. Others are an open space for both common and niche interests. © iStock Here, CNN Underscored breaks down some of the biggest platforms out there on what they do best, and where they may fall short. After identifying the most popular e-learning services, we tested out the different kinds of courses each offered, from cooking to calculus to language learning to yoga.

I don ' t necessarily think instanceof is bad for coders who know what they are doing and use it to avoid having to write more complicated code to get around it. There is a use for everything, and also a mis-use. With that said, the description you provide does not require instanceof. There are various ways you can implement this without instanceof, and (the most important thing) the alternate solution must be better than using instanceof. Don ' t just go with a non-instanceof solution to avoid instanceof because you heard it is bad. I think that for your scenario an non-instanceof solution has benefits in making the

Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers. Jobs Programming & related technical career opportunities. Talent Recruit tech talent & build your employer brand. Advertising Reach developers & technologists worldwide. It is simple fix in Ubuntu. You have to generate the Locales from scratch, running the following commands from the command line: sudo locale-gen en_ US en_ US .UTF-8 sudo dpkg-reconfigure locales. This should create the locales and then re-configure them.

SEE: How to become a developer: A cheat sheet (TechRepublic)

Keeping Stack Overflow fast and lightweight remained central to the team's ambition throughout the site's history, said Arcoverde and Donovan. As such, the development team had to prioritize things like ensuring regularly-accessed data could be recalled quickly, by leveraging processes like memorization and caching.

This need for speed also informed the decisions around what programming languages were used to build Stack Overflow.

"High-level languages provide safety but have a lot more runtime overhead, so can be slower," said Arcoverde and Donovan.

"We've optimized for speed, so our code in some places looks a lot like C, because we do use a lot of the patterns that C uses, like direct access to memory, to make it fast," they said.

"We use a lot of static methods and fields as to minimize allocations whenever we have to. By minimizing allocations and making the memory footprint as slim as possible, we decrease the application stalls due to garbage collection."

Techies give an old fashioned Supreme Court decent marks in coding case

  Techies give an old fashioned Supreme Court decent marks in coding case Programmers say the Supreme Court, often teased for its ambivalence toward technology, got it (mostly) right in describing some nuances of software.Often teased for their ambivalence toward technology – Chief Justice John Roberts once asked a lawyer in 2010 to explain the difference between an email and a pager – the justices this week were forced to grapple with complicated programming concepts in a multi-billion-dollar copyright dispute between tech giants Google and Oracle.

The best and most important thing you can do is lead by example. Do things the right way and try to improve things slowly. You aren' t going to fix anything overnight. Make sure every piece of code that you are responsible for is better after you are done with it. Over time, the system will tangibly be Adapting to poor coding standards and design is not helpful. My advice to this kid is stick around if need be but don ' t expect anyone to respect his opinion if he's fresh out of school. And calling other developers out with his current status is dangerous and not beneficial. He either has to put up with it

Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers. Jobs Programming & related technical career opportunities. Talent Recruit tech talent & build your employer brand. Advertising Reach developers & technologists worldwide. We don ' t know where is the error from. Anybody can find the error of my coding , because this 3 file is in the same folder.

  • The essential 10 programming languages developers need to know this year
  • Low-code development: Why demand for 'citizen developer' tools is growing fast
  • Hiring developers is going to be your next big problem
  • These are the programming languages most in-demand with companies hiring

But this preference for fast code came with a trade-off: namely, that it made testing and maintaining code more difficult. This is where Arcoverde and Donovan admit eschewing best practices, including what the pair call one of the "most non-controversial" – and widely accepted – good practices in the industry: automated tests.

"We don't write a lot of these because our code doesn't follow standard decoupling practices; while those principles make for easy to maintain code for a team, they add extra steps during runtime, and allocate more memory," the pair explained.

"It's not much on any given transaction, but over thousands per second, it adds up."

Similarly, Arcoverde and Donovan said they didn't write unit tests for every new feature, either. "The thing that hinders our ability to unit test is precisely the focus on static structures. Static methods and properties are global, harder to replace at runtime, and therefore, harder to 'stub" or 'mock'," they said.

Low-code and no-code won't kill developer jobs, here's why

  Low-code and no-code won't kill developer jobs, here's why Developers are the Jedis of innovation. Low-code and no-code won't change that, but it will bring more people into the field of software development and help companies be more agile.Will the low-code and no-code movement result in fewer developer jobs? Or, will it actually encourage more people to become developers? In this episode of Dynamic Developer, we're going to talk with Marcus Torres, GM of IntegrationHub and VP of Platform Product with ServiceNow, about how the low-code and no-code movement is affecting the field of software development.

"If we cannot mock a database connection, for instance, we cannot write tests that don't have access to the database. With our code base, you won't be able to easily do test-driven development or similar practices that the industry seems to love."

SEE: Top 5 programming languages for systems admins to learn (free PDF) (TechRepublic)

Arcoverde and Donovan are keen to point out that they're not suggesting doing away with best practices altogether. They are, after all, there for good reason, and the pair note that Stack Overflow is in the process of trying to make its code more 'testable' now that the site has been running successfully for more than a decade.

Instead, the lesson is more around the idea that it is OK for developers to flex industry-established guidance if it helps them get the results they want from their software, not to mention cut back on the huge amount of energy developers already spend on tedious and time-consuming tasks.

As Arcoverde and Donovan put it: "The patterns and behaviors that have made it into best practices in the software engineering industry did so for a reason. They make building software easier, especially on larger teams. But they are best practices, not required practices.

"Complex or chaotic problems require novel solutions. Sometimes you may need to intentionally break one of these rules to get the specific results that your software needs."

Google Chrome: This new feature makes it tougher for hackers to attack Windows 10 PCs

  Google Chrome: This new feature makes it tougher for hackers to attack Windows 10 PCs Developers need to take note of Chrome's adoption of a Windows 10 security feature called "Hardware-enforced Stack Protection".June 8, 2019 Mountain View / CA / USA - Google office building in the Company's campus in Silicon Valley; The "double o's" of the logo are decorated in rainbow colors in honor of LGBTQ Rights

Also see

  • Listen to TechRepublic's Dynamic Developer podcast (TechRepublic)
  • How to become a developer: A cheat sheet (TechRepublic)
  • Microservices: A cheat sheet (free PDF) (TechRepublic)
  • Hiring Kit: .Net developer (TechRepublic Premium)
  • Programming languages: Developers reveal most loved, most loathed, what pays best (ZDNet)
  • Programming languages and developer career resources (TechRepublic on Flipboard)

Android 12 cheat sheet: Everything you need to know .
Android 12 improves the user experience from Android 11 and adds exciting features to the platform. Here's what developers, businesses and users need to know about Google's Android 12.There are areas where the platform could use some polish--that's where Android 12 comes into play. The latest iteration of Google's mobile operating system brings new features and tweaks to various elements, as well as improvements to privacy and even haptic feedback.

usr: 0
This is interesting!