front matter

preface

I’ve experienced many distinct aspects of becoming proficient in software development as a self-taught programmer (other than reading books), ranging from trying to learn machine language by putting random numbers in memory and observing whether the results were anything other than a simple halt, to spending nights in smoke-filled offices, to sneaking off the university campus in the middle of the night after working clandestinely in the lab as a high schooler, to reading the contents of binary files and just hoping that getting exposed to some bytes would make me magically understand how the code works, to memorizing opcodes, and to trying every combination of the order of arguments to figure out the correct one in a function due to lack of documentation.

Back in 2013, my friend Aziz Kedi, who used to own a bookstore in Istanbul, asked me to write a book about software development based on my experiences. That was the first time I considered writing a book about my profession. I had to shelve the idea soon thereafter because Aziz closed his bookstore and moved to London.

I kept entertaining the idea of having a book I could hand out to new team members who were at the start of their career so they could close the experience gap while widening their perspective. The pre-career understanding of software development is heavily shaped by curricula, preconceptions, and best practices. A newly minted programmer naturally thinks of their accumulated knowledge as a core investment and doesn’t want to wander far from it.

At some point, I decided to write such a book—very slowly. I called the fictional book Street Coder and started making notes of random ideas that could make the lives of new developers easier. They didn’t have to be best practices, either—they could even be bad practices, if you will, as long as they made developers better thinkers about the problems they faced. The document had grown, and at a certain point, I forgot about it, until the day I got a call from London.

It wasn’t Aziz Kedi this time. He was probably busy writing screenplays back then, and I’m sure he’s working on another one as I’m writing this. This time, it was Andy Waldron from Manning Publications. He asked me, “What idea do you have for a book?” I couldn’t think of anything at first, and I was preparing—just to gain some time—to counter his question with this question: “Well, what did you have in mind?” I pretty much mumbled a bit, and then it suddenly struck me. I remembered the notes I’d been taking and the title I had given it: Street Coder.

The title comes from what I learned in the streets, the professional software development world, by many trials and errors, which gave me a pragmatic, down-to-earth perspective about approaching software development as a craft. This book conveys the changes in perspective I’ve experienced so you’ll have a head start in your career.

acknowledgments

This book wouldn’t have been possible without my wife, Günyüz. She’s carried everything on her shoulders while I’ve been busy writing. Thank you, babe. I love you.

Thanks go to Andrew Waldron, who kick-started my passion for authoring this book. This has been a phenomenal experience. Andy has always been tolerant and understanding, even when I accused him of secretly sneaking into my home and changing the book’s text. I owe you a drink, Andy.

Thanks go to my development editors, Toni Arritola, who taught me everything I know about writing programming books, and Becky Whitney, who’s been patient and good natured about all the badly written parts I originally turned in—which were Andy’s doing, really.

Thanks go to the technical reviewer, Frances Buontempo, who’s been extremely constructive and on-point for the technical feedback. Thanks also go to Orlando Méndez Morales for making sure that the code I share in the book actually makes sense.

Thanks go to my friends Murat Girgin and Volkan Sevim, who reviewed the earliest drafts and assured me that my jokes would’ve been funny if the reader knew me.

I thank Donald Knuth for letting me quote him. I find myself lucky to have gotten a personal response from him, even if it was only “OK.” I also thank Fred Brooks for reminding me that there’s a fair use clause in the copyright law, so I don’t need to call him every day to ask for his permission, and also not to trespass in his home at 3 a.m. There was really no need to involve the cops, Fred—I was just leaving! Thanks also go to Leon Bambrick for letting me quote him peacefully.

Thanks go to MEAP readers, especially Cihat İmamoğlu, whom I don’t know personally, but who wrote a crazy amount of in-depth feedback. I thank all the Manning reviewers: Adail Retamal, Alain Couniot, Andreas Schabus, Brent Honadel, Cameron Presley, Deniz Vehbi, Gavin Baumanis, Geert Van Laethem, Ilya Sakayev, Janek López Romaniv, Jeremy Chen, Jonny Nisbet, Joseph Perenia, Karthikeyarajan Rajendran, Kumar Unnikrishnan, Marcin Sęk, Max Sadrieh, Michael Rybintsev, Oliver Korten, Onofrei George, Orlando Méndez Morales, Robert Wilk, Samuel Bosch, Sebastian Felling, Tiklu Ganguly, Vincent Delcoigne, and Xu Yang—your suggestions helped make this a better book.

And finally, I thank my dad for teaching me that I can make my own toys.

about this book

Street Coder fills in the gaps of the professional experience of a software developer by tackling well-known paradigms, showing anti-patterns, and seemingly bad or less-known practices that can be useful in the streets—the professional world. The goal of the book is to equip you with a questioning and practical mindset and to help you understand that the cost of creating software is more than just Googling and typing. It also shows that some mundane work can help you save more time than it takes. In general, the book aims to be a perspective changer.

Who should read this book

This book is for beginning- and medium-level programmers who have managed to learn programming by means other than traditional schooling, but who still need an expanded perspective on paradigms and best practices of software development. The examples are in C# and .NET, so familiarity with those languages can help as you read, but the book strives to be, as much as possible, language and framework agnostic.

How this book is organized: A road map

  • Chapter 1 introduces the concept of a street coder—a developer who has been molded by professional experience—and describes the qualities that can help you become that person.

  • Chapter 2 discusses how theory matters in practical software development and why you should care about data structures and algorithms.

  • Chapter 3 explains how certain anti-patterns or bad practices can actually be useful or even be preferable in many situations.

  • Chapter 4 tackles the mysterious world of unit testing and how it can help you write less code and do less work, even though it may seem to be more work initially.

  • Chapter 5 discusses techniques for refactoring, how to do it easily and safely, and when to avoid it.

  • Chapter 6 introduces some basic security concepts and techniques and shows defenses against most common attacks.

  • Chapter 7 shows some hard-core optimization techniques, shamelessly recommends premature optimization, and describes a methodical approach to fixing performance problems.

  • Chapter 8 describes techniques to make your code more scalable and tackles parallelization mechanics and their impact on performance and responsiveness.

  • Chapter 9 goes over best practices for handling bugs and errors. Specifically, it encourages not handling errors and describes techniques for writing fault-resilient code.

About the code

Most of the code is included to support concepts and may be missing implementation details to focus on the actual topic. Fully functioning code has been provided for several projects in the online GitHub repository (https://github.com/ssg/streetcoder) and on the Manning website (https://www.manning.com/books/street-coder), so you can run them and experiment on them locally. One example specifically focuses on a migration scenario from .NET Framework, which means that specific project may not build on non-Windows machines. An alternate solution file for the book is provided in the repository for those platforms so you can build without any issues.

This book contains many examples of source code both in numbered listings and in line with normal text. In both cases, source code is formatted in a fixed-width font like this to separate it from ordinary text. Sometimes code is also in bold to highlight code that has changed from previous steps in the chapter, such as when a new feature adds to an existing line of code.

In many cases, the original source code has been reformatted; we’ve added line breaks and reworked indentation to accommodate the available page space in the book. In rare cases, even this was not enough, and listings include line-continuation markers (). Additionally, comments in the source code have often been removed from the listings when the code is described in the text. Code annotations accompany many of the listings, highlighting important concepts.

liveBook discussion forum

Purchase of Street Coder includes free access to liveBook, Manning’s online reading platform. Using liveBook’s exclusive discussion features, you can attach comments to the book globally or to specific sections or paragraphs. It’s a snap to make notes for yourself, ask and answer technical questions, and receive help from the author and other users. To access the forum, go to https://livebook.manning.com/#!/book/street-coder/ discussion. You can also learn more about Manning’s forums and the rules of conduct at https://livebook.manning.com/#!/discussion.

Manning is committed to providing our readers with a venue where a meaningful dialogue between individual readers and between readers and the author can take place. It is not a commitment to any specific amount of participation on the part of the author, whose contribution to the forum remains voluntary (and unpaid). We suggest you try asking him some challenging questions, lest his attention stray! The forum and the archives of previous discussions will be accessible from the publisher’s website as long as the book is in print.

about the author

Kapanoglu 

Sedat Kapanoğlu is a self-taught software developer from Eskişehir, Turkey, who later worked as an engineer at Microsoft Corporation in Seattle, Washington, in the Windows Core Operating System division. His professional software development career spans three decades.

Sedat is the youngest of five children born to Bosnian parents who emigrated from the former Yugoslavia to Turkey. He founded the most popular Turkish social platform in the world, Ekşi Sözlük (https://eksisozluk.com), which means “sour dictionary.” In the 1990s, he was active in the Turkish demoscene, which is an international digital art community for creating code-generated graphical and musical presentations.

Find him on Twitter @esesci or on his programming blog at https://ssg.dev.

about the cover illustration

The figure on the cover of Street Coder is captioned “Lépero,” meaning “vagabond.” The illustration is taken from Trajes civiles, militares y religiosos de México by Claudio Linati (1708-1832), published in 1828. Linati was an Italian painter and lithographer who established the first lithographic press in Mexico. The book depicts civil, military, and religious costumes of Mexican society and was one of the first color-plate books about Mexico to be printed, as well as the first book about Mexican people written by a foreigner. The volume includes 48 hand-colored lithographs, with brief descriptions of each one. The rich variety of drawings in the collection reminds us vividly of how culturally separated the world’s regions, towns, villages, and neighborhoods were just 200 years ago. Isolated from each other, people spoke different dialects and languages. In the streets or in the countryside, it was easy to identify where they lived and what their trade or station in life was just by their dress.

Dress codes have changed since then, and diversity by region, so rich at the time, has faded. It is now hard to tell the inhabitants of different continents apart, let alone those of different towns or regions. Perhaps we have traded cultural diversity for a more varied personal life—certainly for a more varied and fast-paced technological life.

At a time when it is hard to tell one computer book from another, Manning celebrates the inventiveness and initiative of the computer business with book covers based on the rich diversity of regional life two centuries ago, brought back to life by images from collections such as this one.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.199.122