RDBMS は便利だからもっと使っていきましょうというお話。 表参道.rb #25 Rails アンチパターン で話しました。 https://omotesandorb.connpass.com/event/62936/
Pure render optimized React components can be extremely performant but it requires users to treat their data as immutable for it to work properly. Unfortunately due to nature of Javascript it can be quite challenging sometimes. tl;dr. The anti-pattern is creating new arrays, objects, functions or any other new identities during render or in Redux connect(mapState). Pure render?With React.js pure r
I tweeted about ORM last week, and since then several people have asked me to clarify what I meant. I have actually previously written about ORM, but it was in the context of a larger discussion about SQL and I shouldn't have confused the two issues. So here I'm going to focus on ORM itself. I'm also going to try to be very brief, since it became very apparent from my SQL article that people tend
So many times I have seen developers use the index of an item as its key when they render a list. { todos.map((todo, index) => <Todo {...todo} key={index} />); } It looks elegant and it does get rid of the warning (which was the ‘real’ issue, right?). What is the danger here? It may break your application and display wrong data! Let me explain, a key is the only thing React uses to identify DOM el
An anti-pattern in software engineering, project management, and business processes is a common response to a recurring problem that is usually ineffective and risks being highly counterproductive.[1][2] The term, coined in 1995 by computer programmer Andrew Koenig, was inspired by the book Design Patterns (which highlights a number of design patterns in software development that its authors consi
Javaのダメなコーディング Javaのアンチパターンと言うほど高尚なものではないけれど、「こんな事しちゃアカンよ」という例。 Formatを同期せず使用 [/2008-05-12] 不要なnew [2008-04-26] Stringの等値比較方法 定数==変数 [/2008-05-23] Integerの使用方法 [/2008-05-21] Exceptionの使用目的 回数指定ループ [2008-04-26] イテレーター+カウントパターン [/2014-10-04] Format系クラスの同期 Format系のクラスはMTセーフでない。[2008-04-26] Format系のクラスというのは、java.text.Formatを継承したクラス、すなわちDateFormatとかNumberFormat(DecimalFormat)といったクラスのこと。 これらのクラスのJavadoc
Today, we’d like to highlight a dangerous anti-pattern in the identity world: the false identifier anti-pattern. An anti-pattern is a common response to a recurring problem that’s usually ineffective and risks being highly counter-productive. You may have also heard of the password anti-pattern. Today's discussion represents a possibly even more dangerous practice. The false identifier anti-patte
The “Broken Iron Triangle” Software Development Anti-Pattern Software development initiatives often fail because the organization sets unrealistic goals for the “iron triangle” of software development: Scope (what must be built) Schedule (when it must be built by) Resources (how much it must cost) The development team has failed at renegotiating the situation, and is forced to try to deliver under
12 December, 2016 CSS Shorthand Syntax Considered an Anti-Pattern Written by Harry Roberts on CSS Wizardry. There’s a very small but surprisingly significant (and even more surprisingly frequent) issue I spot a lot in other peoples’ code, either when working directly with it, refactoring it, or auditing it: the use of shorthand syntax in CSS. Typically we would view shorthand syntax as a benefit:
Home Blog 2012-05-07 I spend an unusually large amount of time thinking about interactions between what I call ‘past me’ and ‘future me.’ It seems that my life changes significantly every few years, and I like to ground myself by imagining how odd it would be if ‘current me’ could tell ‘past me’ things like ‘Someday, you’ll be speaking at OSCON.’ It’s not always general life stuff, though, it’s of
There’s a pattern that comes up from time to time in the release management of free software projects. To allow for big, disruptive changes, a new development branch is created. Most of the developers’ focus moves to the development branch. However at the same time, the users’ focus stays on the stable branch. As a result: The development branch lacks user testing, and tends to make slower progres
はてなブックマークはオンラインでブックマークを管理・共有できる無料サービス。自宅、職場、外出先、どこからでも同じブックマークにアクセスできます。ユーザーはみんなでブックマークを共有して効率良く情報収集しています。はてなブックマークを始めてAnti_patternさんのブックマークを追いかけてみましょう!
One of the most common patterns I see in software design with Objective-C (and sometimes Swift), is the use of enumeration types (enum) as configurations for a class. For example, passing an enum to a UIView to style it in a certain way. In this article, I explain why I think this is an anti-pattern and provide a more robust, modular, and extensible approach to solving this problem. The configurat
Ruby comes with many fantastic Enumerable methods, but the two most useful ones come through Smalltalk via LISP: #map and #inject. What follows are some lengthy method definitions followed by rewrites that are not only more concise but also more clear in their intentions. Building an array Requirement: As a user with a PGP key I want to see the list of key ids for all my signers so I can quickly i
file encoding In Vim script, :scriptencoding exists to specify a file encoding. Generally it should define :scriptencoding when you use multibyte character. When you don't use multibyte character, you don't have to define :scriptencoding. Therefore you have to use :scriptencoding at the head of your vimrc. Bad pattern " use multibyte charactor. let g:indentLine_char = '|' Good pattern scriptencodi
The developers behind the OAuth protocol have developed a new variant called OAuth WRAP that is simpler and easier to implement. It's a stop-gap solution that will enable broader OAuth adoption while OAuth 2.0, the next generation of the specification, is devised by a working group that is collaborating through the Internet Engineering Task Force (IETF). Understanding the password anti-pattern Man
Cookie Policy We may store information about you using cookies (files which are sent by us to your computer or other access device) which we can access when you visit our site in future. We do this to enhance user experience. If you want to delete any cookies that are already on your computer, please refer to the instructions for your file management software to locate the file or directory that s
sigsafeというUNIX向けの小さなライブラリがあります。これは、「シグナルを正確に取り扱うのは非常に難しい、俺たちのライブラリを使うと随分楽になるよ」といった趣旨の、アセンブラとCで書かれたライブラリで、それなりの種類のOS、CPUがサポートされています。 このライブラリ自体の使い方、使い勝手、あるいはどう実装されているかについてはまだ把握しきれていないのですが、ドキュメントに有用な部分があるのでご紹介します。 http://www.slamb.org/projects/sigsafe/api/patternref.html です。非同期シグナルを使用したコーディングを行う際の、一種のアンチパターン集になっています。 悪い例1: signal safe ではない関数をシグナルハンドラから呼んでしまう void unsafe_sighandler_a(int signum) { pri
One of the advantages of being a consultant is getting to see different environments and being able to visualise and identify patterns and anti-patterns. "An anti-pattern is a pattern that may be commonly used but is ineffective and/or counterproductive in practice" http://en.wikipedia.org/wiki/Anti-pattern As a first step, let’s describe TTDD – Tautological Test Driven Development as an anti-patt
This post is a spin-off from various conversations around improving (I’m trying not to say standardising, otherwise I’ll have to link to XKCD) the way logging is performed in Go projects. Consider this familiar pattern for establishing a package level log variable. package foo import “mylogger” var log = mylogger.GetLogger(“github.com/project/foo”) What’s wrong with this pattern? The first problem
In this post I will describe the Preemptive Interface pattern often used in code and why I think it is generally an incorrect pattern to follow in Go. What is a Preemptive InterfaceInterfaces are a way to describe behavior and exist in most typed languages. Preemptive interfaces are when a developer codes to an interface before an actual need arrises. An example may look like the following. type A
“When all you have is a hammer, every problem looks like a nail.” When all you know is SQL Server, it’s tempting to try and solve every problem with a relational database, but often it’s not the best tool for the job. Today I want to introduce you to an excellent example of this, the ‘Database As Queue’ anti-pattern. It’s a common specimen that you’ll find in the wild in many enterprise developmen
Andrew Welch · Insights · #css #background-image #frontend Making the web better one site at a time, with a focus on performance, usability & SEO Published 2019.05.28, updated 2020.07.08 · 5 min read · RSS Feed Please consider 🎗 sponsoring me 🎗 to keep writing articles like this. The CSS background-image property as an anti-patternThe CSS background-image property allowed us to do some
We as developers tend to apply the same techniques to solve every problem thrown at us. We learn a new design pattern and all of a sudden that pattern is all over our codebase. We find a new way of writing code and we apply it wherever we can because we are very excited about it or because it feels like it could simplify our solution. In the past few years, particularly in .Net space, there has be
Reading Time: 5 minutesCurrently, I am refactoring a mid-size application which I started more than a year ago (additionally, to my daily workload). The project is a ReactJS application consisting of more than 120 components already. I started developing without Flux (mainly, due to the fact that I didn't understand the need for Flux initially). In the meanwhile, I […]
"Enums as configuration: the anti-pattern"から見るStruct + static varの組み合わせの便利さiOSSwift はじめに 少し前の話題になりますが、以下のタイトルの海外ブログが投稿されていました。 Enums as configuration: the anti-pattern 記事の中では、Enumを使って表現されがちな実装を例に上げつつ、代替としてStructの利用を推奨しています。私自身、これを読んでからEnumとStructのどちらが最適な選択であるのか都度意識して考えるようになり、Struct + static varの組み合わせの使い勝手の良さを実感するようになりました。そこで、その内容に関してまとめてみたいと思います。 SwiftのEnumは便利 Swiftについて勉強し始めると、きっとEnumの魅力について色んな人から
Service Locator is a well-known pattern, and since it was described by Martin Fowler, it must be good, right? No, it's actually an anti-pattern and should be avoided. Let's examine why this is so. In short, the problem with Service Locator is that it hides a class' dependencies, causing run-time errors instead of compile-time errors, as well as making the code more difficult to maintain because it
Web Font Anti-Pattern: Aggressive subsetting October 13, 2015 Subsetting is a great way to reduce the file size of your fonts. Don’t go overboard with subsetting though, there may be unexpected consequences. Subset, but subset with care. Professionally designed fonts usually contain support for multiple languages so they can be used all over the world. However, if you only
Web Font Anti-Pattern: Overusing web fonts October 13, 2015 This is my favourite web font anti-pattern and one I often get wrong myself; why are you using web fonts for that? I get it. Web fonts are great. I love them too, but they are overused. The global average of font requests per page has tripled in the last couple years. It’s great that developers and designers are using more
Let us open Schrödinger’s Box to see what’s inside. Spoiler: It’s a dead cat. Photo by georgi benev on UnsplashMany people like Tailwind’s so-called “utility-first” approach, and I understand why. However, you should know that this technique is nothing new. As a matter of fact, there were small CSS snippets that existed way before Bootstrap that came with classes like .p-8. They were not considere
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く