Are you over 18 and want to see adult content?
More Annotations
![A complete backup of expresstorussia.com](https://www.archivebay.com/archive2/a6c21eee-070f-4832-8114-ac1a865fc7a6.png)
A complete backup of expresstorussia.com
Are you over 18 and want to see adult content?
![A complete backup of northkingdom.com](https://www.archivebay.com/archive2/9479bec0-0709-4e54-8465-4d4aec9c1cd7.png)
A complete backup of northkingdom.com
Are you over 18 and want to see adult content?
Favourite Annotations
![A complete backup of omgww-my.sharepoint.com](https://www.archivebay.com/archive2/b455acd6-6a7f-4684-8e97-a6025657b2a6.png)
A complete backup of omgww-my.sharepoint.com
Are you over 18 and want to see adult content?
![A complete backup of branderstand.com](https://www.archivebay.com/archive2/374ea95e-57b8-4303-ae86-461e3f545c89.png)
A complete backup of branderstand.com
Are you over 18 and want to see adult content?
![A complete backup of bantennews.co.id](https://www.archivebay.com/archive2/ff5b274b-8573-4fae-867b-5bd67550f2cd.png)
A complete backup of bantennews.co.id
Are you over 18 and want to see adult content?
![A complete backup of satrioarismunandar6.blogspot.com](https://www.archivebay.com/archive2/dc3928c5-0f80-4ee8-82c5-ae3f3ceeb04c.png)
A complete backup of satrioarismunandar6.blogspot.com
Are you over 18 and want to see adult content?
![A complete backup of boyharsher.bigcartel.com](https://www.archivebay.com/archive2/77cafffb-a171-4308-b2ec-73b2e6f98d31.png)
A complete backup of boyharsher.bigcartel.com
Are you over 18 and want to see adult content?
![A complete backup of sammyhale.tumblr.com](https://www.archivebay.com/archive2/63f1eb7d-61c5-45e6-a76c-4c9d37d8e2de.png)
A complete backup of sammyhale.tumblr.com
Are you over 18 and want to see adult content?
![A complete backup of magicvalley.coop](https://www.archivebay.com/archive2/1994950a-1f33-452d-8420-e675ce73ad34.png)
A complete backup of magicvalley.coop
Are you over 18 and want to see adult content?
![A complete backup of beauteouslenses.com](https://www.archivebay.com/archive2/999471bc-aeaa-46a2-987f-9bb974b6451d.png)
A complete backup of beauteouslenses.com
Are you over 18 and want to see adult content?
Text
distance
WHAT A COMPILER DOES: SYMBOL RESOLUTION IS REFERENCE COUNTING SLOWER THAN GC? THE BITWISE COMPLEMENT, OR NOT OPERATOR, IS UNSAFESEE MORE ONMORTORAY.COM
WHY GARBAGE COLLECTION IS NOT NECESSARY AND ACTUALLY In the world of new languages it seems like garbage collection is standard feature. A way for the runtime to locate unused bits of memory and release them. It has become so common that some people can't even imagine using a language without it. Programmers, particularly ones new to the trade, tend to be exposed HOW TO WRITE A CUSTOM SELECTOR IN REACT const held_item = useSelector( game_state => game_state.held_item ) Only when game_state.held_item changes will the component rerender. useSelector itself isn’t magical. It is essentially a layer in between the state and the control. It will listen to every update to the game state, and run the selection function. WHY SWITCH IS BETTER THAN IF-ELSE In Ben’s post, he questions whether switch statements are cleaner than if-else chains. I contend they are, because they better express the semantics of the code, allow less room for errors, reduce duplication, and potentially improve performance.I've never become overly convinced that switch statements are that much cleaner than `if else if else if else WHAT IS EVENT PROGRAMMING? Communicating between components with events is one of the fundamental programming paradigms. One module publishes an event, and other modules respond via listeners. It's an asynchronous model that provides an excellent separation of responsibility yet still allows several components to work together. Beyond just messages, it also introduces a dispatcher, which is a useful WHAT IS RESPONSIVE LAYOUT? HOW DOES A MUTEX WORK? WHAT DOES IT COST? The overhead costs of a mutex relate to the test-and-set operation and the system call that implements a mutex. The test-and-set is likely a minuscule cost; being essential to concurrent processing, CPU vendors have a strong incentive to make it efficient. We’ve ignored another important instruction, however: the fence. QUICKLY DRAWING A ROUNDED RECTANGLE WITH A GL SHADER The corners of a rounded rectangle can be treated as quadrants of a circle. The radius of the corner tells us the size of the circle, and the position of its center. The overlayed pink shows the area that completely covers the corner. This is a set of two triangles that I will give to the vertex shader. The pixel shader calculates thedistance
WHAT A COMPILER DOES: SYMBOL RESOLUTION IS REFERENCE COUNTING SLOWER THAN GC? THE BITWISE COMPLEMENT, OR NOT OPERATOR, IS UNSAFESEE MORE ONMORTORAY.COM
WHY GARBAGE COLLECTION IS NOT NECESSARY AND ACTUALLY In the world of new languages it seems like garbage collection is standard feature. A way for the runtime to locate unused bits of memory and release them. It has become so common that some people can't even imagine using a language without it. Programmers, particularly ones new to the trade, tend to be exposed QUICKLY DRAWING A ROUNDED RECTANGLE WITH A GL SHADER The corners of a rounded rectangle can be treated as quadrants of a circle. The radius of the corner tells us the size of the circle, and the position of its center. The overlayed pink shows the area that completely covers the corner. This is a set of two triangles that I will give to the vertex shader. The pixel shader calculates thedistance
WHAT IS DECLARATIVE PROGRAMMING? Declarative programming is a paradigm that expresses the desired result, not how to achieve it. It uses rules and constraints to describe a user interface, the layout of a network, the structure of a document, or a language parser. Declarative languages are highly domain specific, offering a concise syntax for those applications. Why Declarative programming WHAT IS REFERENCE COUNTING? Reference counting is one such technique. This method is simply keeping an extra counter along with each object that is created. The counter is the number of references that exist to the object, in the C/C++ case this would how many pointers refer to this object. THE COST – A FUNCTION CALL – MUSING MORTORAY In the grand scheme of execution costs function calls come very close to the bottom of the list. They don't cost very much at all -- at least not in most compiled languages. It is nonetheless interesting to examine the costs involved. It is even more interesting to CALCULATING SQUARE ROOT USING NEWTON’S ITERATIVE METHOD The formula isn’t hard to understand. is the result of our current guess, our goal is to have this number be equal to zero. To do this we divide it by the slope of the curve at this point: the derivative is , the rate of change, is the value we’re looking for.. Now we just pretend we have a straight line formula for the moment (the reason why I used the word “slope”). THE FALSE ABSTRACTION ANTIPATTERN The false abstraction antipattern. Useless interfaces, factories, and other abstractions are everywhere. They are the result of trying to prematurely generalize code. In a recent article I wrote about how I removed one from Leaf. It was getting in the way of other changes, as antipatterns often do. The false abstraction is any interface, base DOUBLE-CHECKED LOCKING: WHY DOESN’T IT WORK AND HOW TO FIX Double-checked locking is notoriously evil. While it can be a boon to efficiency, it's tricky to do correctly. Lurking at its core are two issues fundamentals to multi-threaded programming. Even if you don't need this pattern, understanding atomicity and visibility is a must for any modern programming. The Pattern Let's look at what adouble-check
CPU MEMORY – WHY DO I NEED A MUTEX? – MUSING MORTORAY It ensures that only one thread is executing a key piece of code at a time, which in turns limits access to a data structure. It ensures that the both threads have a full and proper view of that memory irrespective of any CPU reordering. The mutex isCPU REORDERING
This is when reordering rears its ugly-albeit-highly-efficient head and messes with that logic. The CPU looks at your series of stores, decides it can do this more efficiently and actually executes this series of stores: store data 3 store data 4 store is_ready WHY DOES AMAZON TAUNT ME WITH SURROUND SOUND? Despite a label of 5.1 surround I only ever get stereo sound from Amazon Prime. I mange to get surround from other providers and devices, just not Amazon. Is it one of those annoying licensing issues, perhaps a language mismatch, or is it a technicalMUSING MORTORAY
PROGRAMMING AND LIFESearch for...
MENU
* About Edaqa
* What is Programming? YOUR 30TH YEAR IN CODEBy mortoray
WHY SWITCH IS BETTER THAN IF-ELSEBy mortoray
FLUID LAYOUT ANIMATION: INVALIDATION AND CACHINGBy mortoray
CREATING A CUSTOM AUTHOR BOX ON WORDPRESSBy mortoray
123456
YOUR 30TH YEAR IN CODE By mortoray on 2019-08-02• ( Leave
a comment
)
WHY SWITCH IS BETTER THAN IF-ELSE By mortoray on 2019-06-29• ( 2 Comments
)
FLUID LAYOUT ANIMATION: INVALIDATION AND CACHING By mortoray on 2019-06-24 • ( Leave a comment)
CREATING A CUSTOM AUTHOR BOX ON WORDPRESS By mortoray on 2019-06-13 • ( Leave a comment)
A FAILED EXPERIMENT WITH PYTHON TYPE ANNOTATIONS By mortoray on 2019-06-11• ( 24 Comments
)
A PARADE OF WEB TECH By mortoray on 2019-05-12• ( Leave a
comment
)
nextprevious
YOUR 30TH YEAR IN CODE By mortoray on 2019-08-02• ( Leave
a comment
)
Becoming a programmer can be a daunting task. After reading Your First Year in Code, you might wonder what awaits you long term. My book, What is Programming covers more of the WHY SWITCH IS BETTER THAN IF-ELSE By mortoray on 2019-06-29• ( 2 Comments
)
In Ben’s post, he questions whether switch statements are cleaner than if-else chains. I contend they are, because they better express the semantics of the code, allow less room for errors, reduce FLUID LAYOUT ANIMATION: INVALIDATION AND CACHING By mortoray on 2019-06-24 • ( Leave a comment)
Dynamic changes in layout properties, either because of user actions, or animations, requires a recalculation of the layout. Maintaining a stable frame rate during recalculation is challenging, as the layoutprocess is
CREATING A CUSTOM AUTHOR BOX ON WORDPRESS By mortoray on 2019-06-13 • ( Leave a comment)
How to use custom short-codes to create an author-box in a template. A FAILED EXPERIMENT WITH PYTHON TYPE ANNOTATIONS By mortoray on 2019-06-11• ( 24 Comments
)
I like Python, but wish it had static typing. The added safety would go a long way to improving quality and reducing development time. So today I tried to make use of A PARADE OF WEB TECH By mortoray on 2019-05-12• ( Leave a
comment
)
Perhaps I wrote that I don’t know how to create a website, but glancing back, I certainlyhave built a lot. And oh boy, there’s quite the variety of technology involved. I thought TERRIBLE INTERVIEW QUESTION: SWAP VARIABLES WITHOUT A TEMPORARY By mortoray on 2019-04-25• ( 1 Comment
)
“Clever programming tricks have no place in programming interviews. They usually involve a small amount of code and solve an innocent-sounding question like “find the loop in a linked list”.Often unfair
A PROGRAMMER’S INTRODUCTION TO USER PORTRAITS By mortoray on 2019-03-28 • ( Leave a comment)
As programmers, it’s vitally important for us to understand what our code should be doing. This knowledge starts with knowing the people using our product. While we’re deep in the code, THE AMORTIZED COST OF VECTOR INSERT IS 3 By mortoray on 2019-03-26• ( 6 Comments
)
C++ requires many algorithms to be implemented in amortized constant time. I was curious about what this meant for vector insertion. To get started I first wrote an article about amortized time LESSONS LEARNED FROM RECORDING MY FIRST CLASS By mortoray on 2019-03-22 • ( Leave a comment)
I published my first video class, How to Write a Great User Story, something all programmers should know how to do. Even though the class only went live recently, there’s already a THE INTERNET LOTTERY™ FOR CONTENT CREATORS By mortoray on 2019-03-13 • ( Leave a comment)
Your cursor hovers over the post button. This will be the one. You researched it, you checked it, you got the graphics, and you have the audience. Today you’ll have that successful INVENTED HERE SYNDROME By mortoray on 2019-03-06• ( 21
Comments
)
Are you afraid to write code? Does the thought linger in your brain that somewhere out there somebody has already done this? Do you find yourself trapped in an analysis cycle where ESSENTIAL CODE FOR LISTS AND VECTORS IN AN INTERVIEW By mortoray on 2019-03-01• ( 1 Comment
)
“Lists are perhaps the fundamental data structure in code. There’s virtually no program that doesn’t use lists. Interviewers love asking questions that involve lists, either intentionally, or just because almost everything uses STOP WAVING THE WAND OF MAGIC NUMBERS By mortoray on 2019-02-25• ( 9 Comments
)
37. You have no idea what that number is, do you? A number without context nor a label is a random value. It doesn’t tell us anything. Imagine walking by a billboard,POSTS NAVIGATION
1 2 3 4
5 6
… 18
Older ›
More Posts
READ MY BOOK
_Do you know what it takes to become a great programmer?_ * PEOPLE are the reason software exists. * At the heart of any software is source CODE. * Behind the screen is a real person: YOU.Read Now
FOLLOW ME
Like my work?
Signup to my mailing list* Medium
SEARCH
Search for...
RECENT POSTS
* Your 30th Year in Code * Why switch is better than if-else * Fluid layout animation: Invalidation and caching * Creating a custom author box on WordPress * A Failed Experiment with Python Type Annotations Several links on my site are affiliate links to Amazon.As an Amazon Associate I earn from qualifying purchases. Hosted by WordPress.com . I use Netim and Hover
for domain names.
* TOP CATEGORIES: Programmingleaf
* SOCIAL LINKS:
Twitter Facebook
Google+
Tumblr
|
Post to
Cancel
* Follow
*
* Musing Mortoray
* Customize
* Follow
* Sign up
* Log in
* Report this content * Manage subscriptions* Collapse this bar
Details
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0