All Projects → jennybc → Code Smells And Feels

jennybc / Code Smells And Feels

Talk on code smells and feels and how to change that via refactoring

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Code Smells And Feels

Talk
Talk is a Laravel 5 based realtime users messaging and chatting system
Stars: ✭ 1,366 (+667.42%)
Mutual labels:  talk
Chat Ui Kit React
Build your own chat UI with React components in few minutes. Chat UI Kit from chatscope is an open source UI toolkit for developing web chat applications.
Stars: ✭ 131 (-26.4%)
Mutual labels:  talk
Sctalk
基于spring cloud + Netty实现的聊天,兼容蘑菇街TeamTalk客户端,配合hazelcast提供消息服务器集群功能,同时支持socket和websocket.
Stars: ✭ 153 (-14.04%)
Mutual labels:  talk
Typo3 Rector
Rector for TYPO3
Stars: ✭ 107 (-39.89%)
Mutual labels:  refactoring
Xaml Code Experiences
A collection of the experiences I have collected during days of Xamarin and Wpf, while following the MVVM design pattern.
Stars: ✭ 114 (-35.96%)
Mutual labels:  refactoring
So How Does Babel Even Work
🤔 "So how does Babel even work?" React Rally 2017
Stars: ✭ 135 (-24.16%)
Mutual labels:  talk
Refactoring101
The code here, represented as steps, is the progression of a refactoring on a legacy codebase. It is a PHP equivalent of the Java code shown in the Martin Fowler book "Refactoring".
Stars: ✭ 88 (-50.56%)
Mutual labels:  refactoring
Autorefactor
Eclipse plugin to automatically refactor Java code bases
Stars: ✭ 168 (-5.62%)
Mutual labels:  refactoring
Talk Example
This project is demo for Laravel-Talk package and its also Docker ready
Stars: ✭ 117 (-34.27%)
Mutual labels:  talk
Refactoring Summary 2nd Javascript
Summary of "Refactoring: Improving the Design of Existing Code (2nd Edition)" by Martin Fowler
Stars: ✭ 142 (-20.22%)
Mutual labels:  refactoring
Mort
Dead CSS detection
Stars: ✭ 109 (-38.76%)
Mutual labels:  refactoring
Reftools
reftools - refactoring tools for Go
Stars: ✭ 113 (-36.52%)
Mutual labels:  refactoring
Piranha
A tool for refactoring code related to feature flag APIs
Stars: ✭ 1,840 (+933.71%)
Mutual labels:  refactoring
Splitjoin.vim
Switch between single-line and multiline forms of code
Stars: ✭ 1,383 (+676.97%)
Mutual labels:  refactoring
Vim As An Ide
Workshop on how to use Vim Plugins.
Stars: ✭ 1,915 (+975.84%)
Mutual labels:  talk
Study Path
An organized learning path about Clean Code, Test-Driven Development, Legacy Code, Refactoring, Domain-Driven Design and Microservice Architecture
Stars: ✭ 1,357 (+662.36%)
Mutual labels:  refactoring
Rewrite
Semantic code search and transformation
Stars: ✭ 134 (-24.72%)
Mutual labels:  refactoring
Pre Commit Hooks
Some out-of-the-box hooks for pre-commit
Stars: ✭ 2,605 (+1363.48%)
Mutual labels:  refactoring
Vim Php Refactoring Toolbox
VIM Php Refactoring Toolbox
Stars: ✭ 164 (-7.87%)
Mutual labels:  refactoring
Cscout
C code refactoring browser
Stars: ✭ 139 (-21.91%)
Mutual labels:  refactoring

Code Smells and Feels

Talk initially prepared for useR!2018 Brisbane. Also delivered elsewhere, such as the First Mexican Statistical Association School in Data Science
by Jenny Bryan
jennybryan.org
Twitter: @jennyBryan
GitHub: @jennybc

"Code smell" is an evocative term for that vague feeling of unease we get when reading certain bits of code. It's not necessarily wrong, but neither is it obviously correct. We may be reluctant to work on such code, because past experience suggests it's going to be fiddly and bug-prone. In contrast, there's another type of code that just feels good to read and work on. What's the difference? If we can be more precise about code smells and feels, we can be intentional about writing code that is easier and more pleasant to work on. I've been fortunate to spend the last couple years embedded in a group of developers working on the tidyverse and r-lib packages. Based on this experience, I'll talk about specific code smells and deodorizing strategies for R.

Link to this repo

rstd.io/code-smells is a shortlink to HERE

Slides

Slides on SpeakerDeck

Slides as PDF file here in this repo

Video

Video is available on YouTube:
https://www.youtube.com/watch?v=7oyiPBjLAWY

Credits and resources

Annotated and hyperlink-y list of resources mentioned in the slides, in roughly the same order.


Do useRs have less formal training in CS/programming than others writing code?

2018 Stack Overflow Annual Developer Survey: https://insights.stackoverflow.com/survey

Adapted from original code by Julia Silge, data scientist at Stack Overflow.

Code here in this repo: stackoverflow-survey


Talks about programming style, workflow, and policies

Some that inspired me:

Good Programming Practice, UseR! 2004 Keynote, Martin Mächler
http://www.ci.tuwien.ac.at/Conferences/useR-2004/

What I find important when R Programming and Recent Cool Features in R
2018 eRum Keynote by Martin Mächler and R Core Team
http://stat.ethz.ch/~maechler/U/R/eRum_2018_ProgR-ALTREP.html

My own efforts in this genre:

Zen And The aRt Of Workflow Maintenance, IASC/NZSA 2017, Jenny Bryan

Workflow: You should have one, EARL London 2017, Jenny Bryan


Cakes that look like hedgehogs ... sort of?


What Every Successful Person Knows, But Never Says
James Clear blog post that discusses an Ira Glass interview. Indicative quote:

All of us who do creative work, we get into it because we have good taste. But it's like there is this gap. For the first couple years that you're making stuff, what you're making isn't so good. It’s not that great. It’s trying to be good, it has ambition to be good, but it’s not that good.

But your taste, the thing that got you into the game, is still killer. And your taste is good enough that you can tell that what you're making is kind of a disappointment to you.


The teams that bring you


Refactoring
Improving the Design of Existing Code
by Martin Fowler
(with Kent Beck, John Brant, William Opdyke, and Don Roberts)
https://martinfowler.com/books/refactoring.html

Dumpster photo by NeONBRAND
https://unsplash.com/photos/8Yk4T-tDSYY


Code Smells – a Short List
blog post by Arne Mertz
https://arne-mertz.de/2017/08/code-smells-short-list/


bizarro: all code snippets are given here in R/

Beach + glass orb photo by Perchek Industrie
https://unsplash.com/photos/y-rmmZZfD1I


Good enough practices in scientific computing
Wilson G, Bryan J, Cranston K, Kitzes J, Nederbragt L, et al. (2017) Good enough practices in scientific computing. PLOS Computational Biology 13(6): e1005510. https://doi.org/10.1371/journal.pcbi.1005510

Do not comment and uncomment sections of code to control a program's behavior.


if() else() described in breathless AI style:
you mean a one layer neural network with identity activation and no hidden layers

Tweet by Federico Vaggi


Return early and clearly
Blog post by Arne Mertz
https://arne-mertz.de/2016/12/early-return/
"Handling preconditions" section is the basis of my early return before/after example get_some_data().

More posts and conversations about early returns and avoiding if entirely:

Yoda photo by Kory Westerhold on flickr
https://www.flickr.com/photos/korymatthew/14211839966


Baby with diaper photo by rawpixel
https://unsplash.com/photos/6RjllGKO88U


In addition to the Refactoring book referenced above, these are other good reads for improving your code:

The Art of Readable Code
Simple and Practical Techniques for Writing Better Code
Dustin Boswell, Trevor Foucher
http://shop.oreilly.com/product/9780596802301.do

The Pragmatic Programmer
From Journeyman to Master
by Andrew Hunt and David Thomas
https://pragprog.com/book/tpp/the-pragmatic-programmer


Upgrade your cargo cult for the win
https://meaningness.com/metablog/upgrade-your-cargo-cult

Toddler on run bike photo by Jordan Sanchez
https://unsplash.com/photos/Vbzx-yy5FoA

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].