Saturday, July 07, 2012

Types and Bugs

There are certain discussions in our biz that are so played out they provoke instant boredom upon encounter. A major one is the old dynamic vs. static skirmish, recently resurfaced in a blog post by Evan Farrer. Which is a shame as the post is quite interesting, describing his results transliterating well-tested code in a dynamic language to a static language to see if the type system found any bugs. Which it did.

The full-length paper is a great read as well. He describes his translation methodology and gives some detail on each bug found. At first it may seem the author could be stacking the odds towards the static language as the translation was manually done by himself, but I found his description of the process pretty convincing of its fairness. The choice of Python as a source language probably helped given the pythonic inclination towards straightforward code that avoids sophisticated abstraction and metaprogramming mechanisms.

But the real meat of the paper is in the description of the bugs he found. Upon a not particularly discriminating reading, a clear pattern jumped out. Most of the bugs fell into one of two categories:
  • Assuming that a variable always references a valid value when it can contain a null value. 
  • Referencing constructs that no longer exist in the source.
The first category is also the largest, comprising several places where the original code could be coerced into letting a variable be set to a null value, usually by just leaving it uninitialized, and a subsequent call would attempt to derefence it assuming it contained a valid value. Haskell's type system avoids the problem as it  simply doesn't have any notion of null. Code that has to deal with optional values must do it trough algebraic data types.

How the second category of bug comes about is easy to guess from the projects histories: some method or variable was present but changed, perhaps it was renamed or subsumed, and not all references were updated to reflect the change. Even pervasive unit tests can't hope to catch these kinds of regressions, as the problem is found on the integration between units of code; the units themselves are just fine. A type system helps when the change affects the signature of the referenced construct, which is often but not always.

If the study's findings are generalizable and my observations are correct, these are the main takeaways:
  • If you have a type system at your service, it's prudent to structure code such that behavior-breaking changes are reflected on the types.
  • End-to-end integration tests are a necessary complement to both a suite of unit tests and a type system. In my experience how far should these tests stray off the happy path is a difficult engineering trade-off.
  • If your type system allows nulls — such as Java's, for instance — its role in bug prevention is greatly diminished. The proportion of null-dereference bugs on the analysed code bases helps to makes it clear just how big a mistake it is to allow nulls in a programming language. 


Unknown said...

Why watch for a period of time suddenly go fast, travel time is not stable? Automatic mechanical watches with shockpro of omega replica ability, but if the impact Too large, such as vigorously waving wrist, the impact will make spring up together, to watch too fast or even shut down; more impact will let out of hublot replica watch hairspring,Damping device off, the speed of the needle dislocation, which is fatal for the speed control system. Often suffer from great impact, will make winding efficiency, even failure.What is the "luminous table"? And what is the difference between the electroluminessent table Commonly known as the "luminous table" refers to the nail on the hands or word coated with fluorescent powder, in the dark or light visible hand nail hand Table. There is also a kind of luminous watch is in the middle of 90s appeared to make the entire surface of the fluorescent light. The difference between the two is as follows: 1.luminous watch by Absorption of natural light energy, while the power of yha-travel-insurance the electric meter can be relied on the battery. 2.luminous watch the "glow" light is visible only in the dark, but as long as the electric fluorescent table The corresponding according to the system at any time can shine. 3 light emitting time luminous watch by absorption time and light intensity limit, the electric battery power limit by fluorescence.

vigneswaran said...

There are lots of information about Selenium Testing have spread around the web automate, but this is a unique one according to me.
Selenium Training in Chennai

Ammu said...

Great post.

Best Angular Training Institute in Chennai

service care said...

Alot of blogs I see these days don't really provide anything that I'm interested in, but I'm most definitely interested in this one. Just thought that I would post and let you know. Nice! thank you so much! Thank you for sharing.
samsung service centres in chennai
samsung mobile service center in velachery
samsung mobile service center in porur

jvimala said...

Really awesome blog. Your blog is really useful for me
Best Selenium Training Institute in Chennai | Selenium Course in Chennai

luckys said...


whatsapp plus said...

mobile whatsapp groups

whatsapp plus said...

mobile whatsapp groups

Devender Gupta said...

dtc bus app
dtc bus
dtc bus app download
dtc bus pass
dtc bus route
dtc bus route app
dtc bus app download

Devender Gupta said...

dtc bus app
dtc bus
dtc bus app download
dtc bus pass
dtc bus route
dtc bus route app
dtc bus app download

khushboo said...

The registrations and auditions for the Bigg Boss 13 are going to start soon. The official list of contestants is not yet announced by the officials. That will be announced by the makers on the inaugural day which is 15 the of September. bigg boss 13 contestants name list with photo Though a few rumored names are coming up as the expected celebrity contestants of the year. They are Nia Sharma, Raghav Juyal, Punit Pathak, Divyanka Tripathi, Garima Chaurasia, Ridhima Pandit, Aditya Narayan, Jasmin Bhasin, Zain Imam, Bhuvan Bam, Chetna Pande, Krystle D’Souza, and Devoleena Bhattacharjee. This year too, the show will be back with a new theme and the star host, Salman Khan. Though the theme is not declared yet officially. Stay tuned with us to know more about the show Bigg Boss 13.

Vijiaajith said...

















Devender Gupta said...

WhatsApp group links

MIUI theme

Devender Gupta said...

Dr Driving is one of the my favourite game ever and today I am going to share Dr Driving Mod Apk

Nicolay said...

Nice article

Bulletproof Domain Registration

Vijiaajith said...

how to hack flipkart payment
react native developer resume
group selector css
chemistry interview questions
sample complaint letter to bank for wrong transaction

Vijiaajith said...

javascript int max value
passage writing in fiserv
vijay invested rs.50,000 partly at 10% and partly at 15%. his total income after a year was rs.7000. how much did he invest at the rate of 10%?
residue on ignition
the simple interest earned on a certain amount is double the money

pnjsharptech said...

PNJ Sharptech is a leading Social Media Optimization company in India, specializing in handling both organic and paid Social Media Marketing (SMM) campaigns successfully. We have many years of experiencing increasing online social presence on various social media platforms such as Facebook, Twitter, LinkedIn and Pinterest, and many others. Our SMO experts have a rich knowledge of increasing traffic and maintaining the online social reputation for a long period. How our SMO services make you different from others? Our low-cost social media marketing services are very helpful to build your online reputation and increase sales.

BB Arora said...

40 Lakh mp3 song download pagalworld, tik tok viral song ,Mr jatt. – Presenting the audio song ” 40 Lakh ” this song by Jerry Burj Ft. Ellde Fazilka , song is been written Ellde Fazilka40 Lakh mp3 song download pagalworld

BB Arora said...

Presenting Latest New Bollywood Song Lyrics of Fauj Ki Dahaad Song Lyrics Mr. BratBea From Kartikeye Ojha & Pranshu Jha . The latest Upcomin Movie Code M Song Fauj Ki Dahaad Lyrics are written by Kumaar Mr. BratBeat and Music Directed by Kartikeye Ojha & Pranshu Jha

Fauj Ki Dahaad Song Lyrics Code M | Mr. BratBeat

Unknown said...

Good post....thanks for sharing.. very useful for me i will bookmark this for my future needs. Thanks.
Aloha Browser Turbo For PC

web design company said...

thanks for your's really nice blog thanks for it.keep blogging.
web design company in nagercoil
website design company in nagercoil
web development company in nagercoil
website development company in nagercoil
web designing company in nagercoil
website designing company in nagercoil
digital marketing company in nagercoil
digital marketing service in nagercoil

Daniel Bryan said...

Graceful written content on this blog is really useful for everyone same as I got to know. Difficult to locate relevant and useful informative blog as I found this one to get more knowledge but this is really a nice one.
digital marketing service provider

renshiya said...

thanks for your information.
web design company in nagercoil
best web design company in nagercoil
website design company in nagercoil
web development company in nagercoil
website development company in nagercoil
web designing company in nagercoil
website designing company in nagercoil
digital marketing company in nagercoil
digital marketing service in nagercoil
seo service in nagercoil
seo company in nagercoil
social media marketing in nagercoil
ppc service in nagercoil
web design company in nagercoil
best web design company in nagercoil
web design company in nagercoil
website design company in nagercoil
web development company in nagercoil
website development company in nagercoil
web designing company in nagercoil
website designing company in nagercoil
digital marketing company in nagercoil
digital marketing service in nagercoil
seo service in nagercoil
seo company in nagercoil
social media marketing in nagercoil
ppc service in nagercoil

Unknown said...

I don’t know if it’s just me or if perhaps everyone else encountering problems with your blog. It appears as if some of the written text in your posts are running off the screen. Can somebody else please comment and let me know if this is happening to them too? This may be a issue with my web browser because I’ve had this happen before. Thanks

shane lee said...

With so many to choose from it can be difficult knowing which one is the best service for you. how to choose best stocks for next day

Data Analytics Cerification Training Course in Hyderabad said...

Wow! Such an amazing and helpful post this is. I really really love it. It's so good and so awesome. I am just amazed. I hope that you continue to do your work like this in the future also.
Data Analytics Course in Hyderabad

Admin said...

Super Dj Remix Song New Latest Song Available On This Website,

Good Job Sir

Latest Official Song Download Now Click Here

Download Now Click Here

Training for IT and Software Courses said...

Wow it is really wonderful and awesome thus it is very much useful for me to understand many concepts and helped me a lot.

Devops Certification Online Training in bangalore

Devops Certification courses in bangalore

Devops Certification classes in bangalore

Devops Certification Online Training institute in bangalore

Devops Certification course syllabus

best Devops Certification Online Training

Devops Certification Online Training centers

Training for IT and Software Courses said...

I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you.

salesforce crm training in bangalore

salesforce crm class in bangalore

learn salesforce crm in bangalore

places to learn salesforce crm in bangalore

salesforce crm schools in bangalore

salesforce crm school reviews in bangalore

salesforce crm training reviews in bangalore

salesforce crm training in bangalore

salesforce crm institutes in bangalore

salesforce crm trainers in bangalore

learning salesforce crm in bangalore

where to learn salesforce crm in bangalore

best places to learn salesforce crm in bangalore

top places to learn salesforce crm in bangalore

salesforce crm training in bangalore india

Training for IT and Software Courses said...

Very interesting blog Thank you for sharing such a nice and interesting blog and really very helpful article.

Data Science Online Training

Data Science Classes Online

Data Science Training Online

Online Data Science Course

Data Science Course Online

deiva said...

Thank you much for this tutorial; this is an informative and valuable blog.
java training in chennai

java training in omr

aws training in chennai

aws training in omr

python training in chennai

python training in omr

selenium training in chennai

selenium training in omr

Jayalakshmi said...

After reading your article I was amazed. I know that you explain it very well. And I hope that other readers will also experience how I feel after reading your article.
hardware and networking training in chennai

hardware and networking training in tambaram

xamarin training in chennai

xamarin training in tambaram

ios training in chennai

ios training in tambaram

iot training in chennai

iot training in tambaram

praveen said...

This blog is Very Informative. And i glad to find your blog. Keep Sharing like this useful blog.

data science training in chennai

data science training in porur

android training in chennai

android training in porur

devops training in chennai

devops training in porur

artificial intelligence training in chennai

artificial intelligence training in porur

shiny said...

Great insightful content with good information.

sap training in chennai

sap training in annanagar

azure training in chennai

azure training in annanagar

cyber security course in chennai

cyber security course in annanagar

ethical hacking course in chennai

ethical hacking course in annanagar

vivekvedha said...

Thanks for this informative blog.
acte chennai

acte complaints

acte reviews

acte trainer complaints

acte trainer reviews

acte velachery reviews complaints

acte tambaram reviews complaints

acte anna nagar reviews complaints

acte porur reviews complaints

acte omr reviews complaints

Data Science said...

Awesome article with valuable information it very helpful waiting for next blog update thank you.
Data Analytics Course Online 360DigiTMG

Tech Institute said...

Excellent blog with very impressive writing and unique content, information shared was very valuable thank you.
Data Science Course in Hyderabad

Data Science said...

Top quality blog with very informative information found very useful thanks for sharing.
Data Analytics Course Online

Mohd Sharique said...

amazing post thanks for sharing.

Python Training In Pune
python training institute in pune

Professional Course said...

They are produced by high level developers who will stand out for the creation of their polo dress. You will find Ron Lauren polo shirts in an exclusive range which includes private lessons for men and women.

Business Analytics Course in Bangalore

Data Analytics Course said...

It's like you understand the topic well, but forgot to include your readers. Maybe you should think about it from several angles.

Data Analytics Course in Bangalore

Grace Ella said...

I was worried about my illness as well as studies so that I decided to seek help from a writing service in order to reduce my stress and increase my grades. I am assured that seeking help from can reduce the stress of the students. Dissertation Writing Service

OGEN Infosystem (P) Limited said...

Great Post, thanks for sharing such an amazing blog with us. Visit Ogen Infosystem for creative website design and PPC Services in Delhi, India.
Website Designing Company in Delhi

Liza Mineli said...

Good post! If you post the same on twitter and want to get many likes on it use this site to get as much twitter likes as you need

suresh said...

Nice post. Thanks for sharing! I want people to know just how good this information is in your article. It’s interesting content and Great work.
DevOps Training in Chennai

DevOps Course in Chennai

Trending Technologies said...

Fantastic article and excellent topic with valuable information thanks for sharing.
Data Science Course in Bangalore

360DigiTMGNoida said...

As always your articles do inspire me. Every single detail you have posted was great.
data science certification in noida

ve may bay tet said...

Mua vé máy bay tại Aivivu, tham khảo

vé máy bay đi Mỹ Vietnam Airline

hướng dẫn đi máy bay từ mỹ về việt nam

Vé máy bay từ Nhật Bản về Việt Nam

giá vé máy bay từ Toronto đến việt nam

360DigiTMG said...

Happy to visit your blog, I am by all accounts forward to more solid articles and I figure we as a whole wish to thank such huge numbers of good articles, blog to impart to us.
data science certification

Anonymous said...

Get Rapid Solutions For Norton Antivirus Related Problems..

Visit US:

Michael Catudal said...


360DigiTMG said...

"Very Nice Blog!!!

Please have a look about "
certification of data science

James Yadiel Jose said...

Movie-watching websites that are more than movie-watching websites หนังฝรั่ง Because we are the number 1 free movie site in Thailand for a long time, including new movies, Thai movies, Western movies, Asian movies, we have all kinds of ways for you Including new series Full of all stories without interstitial ads to keep annoying anymore. One place SA-MOVIE

Android and IOS operating systems. Watch online movies, Thai movies, Western movies, ดูหนังชนโรง, Asian movies, Cartoon movies, Netflix Movie, Action Movies, Comedy Movies, Crime Movies, Drama Movies, Horror Movies, Adventure Movies, Crash Movies and still have many new movies to watch. You can watch for free anytime, anywhere 24 hours a day at

GangManga read manga, read manga, read manga online for free, fast loading, clear images in HD quality, all titles, anywhere, anytime, on mobile, tablet, computer. Android and IOS operating systems. Read top comics, action dramas, comedy, adventure, horror and manga. อ่านมังงะ New coming every day to watch many more. Can be read for free anytime anywhere 24 hours a day at

It is no secret that football is among the most popular and widely watched sports. Everybody who likes football tries to find the best platform for free soccer streaming. So, what are the best free sports streaming sites? We are going to answer this question. On this page, you can find a detailed overview of the most widespread soccer streaming websites. ดูบอลออนไลน์ Keep on reading and make the best choice for you.

Priya Rathod said...

Very amazing blog, Thanks for giving me new useful information.
Python Training in Hyderabad
Python Course in Hyderabad

Emerging Technologies said...

I need to thank you for this very good read and i have bookmarked to check out new things from your post. Thank you very much for sharing such a useful article and will definitely saved and revisit your site.
Data Science Course

Knowledge said...

Thank a lot. You have done excellent job. I enjoyed your blog . Nice efforts
Data Science Certification in Hyderabad

Abdulla said...

I read this article. I think You put a great deal of exertion to make this article.
buy instagram followers

360DigiTMGAurangabad said...

This is most informative and also this post most user friendly and super navigation to all posts... Thank you so much for giving this information to me..
machine learning certification in aurangabad

Mallela said...

Thanks for posting the best information and the blog is very marketing institute in hyderabad

Mounika said...

I just got to this amazing site not long ago. I was actually captured with the piece of resources you have got here. Big thumbs up for making such wonderful blog page!
href="" Pmp training

Digital Marketing Training in Bangalore said...

I have voiced some of the posts on your website now, and I really like your blogging style. I added it to my list of favorite blogging sites and will be back soon ...

Digital Marketing Training in Bangalore

360DigiTMG-Pune said...

This website and I conceive this internet site is really informative ! Keep on putting up!
best data science online course

UFABET1688 said...

I wanted to thank you for this great read!! ufabet168 I definitely enjoying every little bit of it I have you bookmarked to check out new stuff you post.

Harris said...

Your authorship style is admirable and the way you managed the subject are clear and insightful. Really iam waiting for reading in typos and functional errors from you bro.. if you can. best 6 burner gas grills, Best thin waffle maker

Data Science said...

I am glad to discover this page. I have to thank you for the time I spent on this especially great reading !! I really liked each part and also bookmarked you for new information on your site.
Data Science Course Syllabus

Bhuvana said...

Incredibly conventional blog and articles. I am really very happy to visit your blog. Directly I am found which I truly need. Thankful to you and keeping it together for your new post…

AWS Training in Hyderabad

360DigiTMGAurangabad said...

"Very Nice Blog!!!

Please have a look about "
ai courses aurangabad

opbest said...

Nice post. I was checking continuously this blog and I am inspired! Extremely helpful info specially the ultimate part
🙂 I take care of such information a lot. I was seeking this certain info for a very long time.
Thank you and best of luck. |

Try to check my webpage :: 오피사이트


training institute said...

wow, great, I was wondering how to cure acne naturally. and found your site by google, learned a lot, now i’m a bit clear. I’ve bookmark your site and also address. keep us updated.
data science course

opbestcom8 said...

Someone necessarily help to make significantly articles I would state.
This is the first time I frequented your website page and thus far? 부산오피

training institute said...

I have been searching to find a comfort or effective procedure to complete this process and I think this is the most suitable way to do it effectively.
data science course in malaysia

Harryjames said...

Thanks for sharing the knowledge and informative information about Types and Bugs Read more. Best Dissertation Writing Services

Unknown said...

i read her blog. is very good all people should try to read his blog.dissertation writing help in uk

Deekshitha said...

Informative blog
data analytics courses in hyderabad

bestbus said...

Awesome content. Thanks for sharing with us.
exam portal online
matrimony website creation

Kristi H. Warren said...

Very Interesting Post! If you face any errors with your account, we can also help you fix those issues. So please consider coming on our SBCGlobal help page.

Technical Knowledge said...

Nice Post thank you very much for sharing such a useful information and will definitely saved and revisit your site and i have bookmarked to check out new things frm your post.
Data Science Course

traininginstitute said...

This is a wonderful article, Given so much info in it, These type of articles keeps the users interest in the website, and keep on sharing more ... good luck
data science training in malaysia

Unknown said...

This one is amazing lather jackets.William Jacket

Black leather Jacket for Men said...

i read her blog. is very good all people should try to read his blog.

Truck and Trailer said...

Excellent information, Thanks for sharing amazing aritcle.
Tire repair near me
Gas near me
Truck repair shop near me
Alignment near me

What is Website said...

I really appreciate your method to explaining, I hope to see more posts from your blog. thank you!
website designer near me
web development company
ppc agency for startups
toronto seo agency

PsgGrant said...

I am very satisfied with your blog, good content are shared.
Accounting software Singapore
Psg grant accounting software
Myob accounting software singapore

The Genuine Leather said...

Goodness! Much obliged to you! I constantly needed to compose on my site something to that effect. Would I be able to incorporate a part of your post into my site? Pelle Pelle jacket

카지노사이트 said...

Of course, your article is good enough, 카지노사이트 but I thought it would be much better to see professional photos and videos together. There are articles and photos on these topics on my homepage, so please visit and share your opinions. said...

Goodness, glad to see this great post. I trust this think help any beginner for their marvelous work and by the way a debt of gratitude is in order for share this magnificence, I thought this was a really fascinating understood with regards to this point. Much thanks to you.. hawkeye coat

Deekshitha said...

Informative blog
data science training in ludhiana

The Genuine Leather said...

It is great to see that some people still put in an effort into managing their websites. I'll be sure to check back again real soon. it's really amazingYellowstone Jacket

C2N said...

These post is lots of information about Selenium Testing have spread around the web automate, but this is a unique one according to me.


Mona Mishra said...

Nice Post, Good content
Web development Company in Hyderabad- Inovies
Ecommerce Development Company
Social Media Marketing Company in Hyderabad

digital marketing training malaysia said...

I was basically inspecting through the web filtering for certain data and ran over your blog. I am flabbergasted by the data that you have on this blog. It shows how well you welcome this subject. Bookmarked this page, will return for extra.

PMP Training in Malaysia said...

360DigiTMG, the top-rated organisation among the most prestigious industries around the world, is an educational destination for those looking to pursue their dreams around the globe. The company is changing careers of many people through constant improvement, 360DigiTMG provides an outstanding learning experience and distinguishes itself from the pack. 360DigiTMG is a prominent global presence by offering world-class training. Its main office is in India and subsidiaries across Malaysia, USA, East Asia, Australia, Uk, Netherlands, and the Middle East.

Unknown said...

Führerschein kaufen
rijbewijs kopen
comprar carta
acheter un permis de conduire
comprar carnet de conducir
Führerschein kaufen
comprar carta de conduçao verdadeira

메이저사이트 said...

It's very interesting. And it's fun. This is a timeless article. I also write articles related to , and I run a community related to 메이저사이트. For more information, please feel free to visit !!

thanvi said...

Thank you for shearing post amazing this is post very useful for me.

AEM Training
Sitecore Training
Dellboomi Training
Guidewire Training
Okta Training

Mahil mithu said...

Well, I really appreciated for your great work. This topic submitted by you is helpful and keep sharing...
Virginia Family Law Attorneys
Multi State Family Law Attorneys

Sruthi Karan said...

Newly I read your post, this is very beneficial for all. Your scope was very impressive and thank you!
Divorce Lawyer Consultation Cost
Child Support Virginia

Diligent Security Services Inc said...

This very informative and interesting blog.
Security Services

Truck and Trailer said...

This very informative and interesting blog.
Tire repair near me

darknet hitman said...

After reading several of your excellent content posts, I'd want to highly encourage you to continue contributing to the website. Your hard work has been greatly appreciated.
how to hire a hit man

Anonymous said...

Implementing a customer loyalty rewards program can be a powerful strategy for small businesses to retain customers and drive repeat purchases. When choosing loyalty rewards program software for small businesses, consider solutions that are cost-effective, easy to use, and tailored to your specific needs. Here are key features and considerations for selecting loyalty rewards program software suitable for small businesses.
Best Customer Loyalty Rewards Programs Software for Small Businesses

Mulemasters said...

Great article! I appreciate you sharing valuable information.
Mulesoft Training In Hyderabad