2011 NOTE: Some links in this presentation are no longer valid. Sorry about that.
As a professional developer, especially one who works in Ruby, you hear about code quality all the time. You learn that testing your code and making it easy to maintain are the path to success. You know about TDD, BDD, TATFT and LMNOP. You learn to cycle from red to green to refactoring. We all do our best to write quality, maintainable, reusable code. We're all human, though; some of us slip, and some of us have had to work hard at preventing code smells. In this talk, I'll talk about how I learned to program, how going pro exposed flaws in my coding style, and how I'm working to improve my code quality, sharing some of my old stinky code, the better, refactored versions, and the lessons I've learned in honing my craft.
Demo de Curso de CICS orientado a programadores que quieran desarrollar aplicativos para grandes empresas con abundante manejo de información tales como bancos, financieras, telefonicas, seguros, aerolineas.
Una Base de Datos es un conjunto de datos almacenados en una estructura física con otra lógica por la cual se relacionan, siendo independiente de las aplicaciones. Tan importante como los datos, es la estructura conceptual con la que se relacionan entre ellos. Un sistema de gestión de bases de datos consiste en una colección de datos interrelacionados y un conjunto de
programas para acceder a esos datos.
Demo de Curso de CICS orientado a programadores que quieran desarrollar aplicativos para grandes empresas con abundante manejo de información tales como bancos, financieras, telefonicas, seguros, aerolineas.
Una Base de Datos es un conjunto de datos almacenados en una estructura física con otra lógica por la cual se relacionan, siendo independiente de las aplicaciones. Tan importante como los datos, es la estructura conceptual con la que se relacionan entre ellos. Un sistema de gestión de bases de datos consiste en una colección de datos interrelacionados y un conjunto de
programas para acceder a esos datos.
Slides from a presentation given at WordCamp Toronto in May 2009. Subject is "Making a living with WordPress in 2009".
The intended audience is designers and developers working with, or interested in working with WordPress.
The tips and advice come from our 5 years experience in doing things the hard way ;)
Presentation by Dennis Wingo on the Lunar Orbiter Image Recovery Project at t...Keith Cowing
"In 2007, the Lunar Orbiter Image Recovery Project (LOIRP) began a process to convert the Lunar Orbiter Images directly from the original analog video recordings of the spacecraft data to digital image format, a change which provided vastly improved resolution over the original images released in the 1960s. The first of these restored images were released in late 2008."
Reviews grammar and parsers and discusses my personal path toward writing my own packrat parser-generator for Erlang called neotoma.
Given to "Evil Robot Conference" on September 12, 2009.
The Atlassian suite of developer tools has grown in the last year, and we have some juicy new products to demo. Hear and see the latest on Stash, Bitbucket, FishEye, Crucible, Bamboo, and SourceTree.
Describes a high-level evaluation of why one would end up actually implementing a framework, how one should approach it, why one would do it, and then actually shows some examples of writing a Rack-based web application development framework called "Fuck".
Quick, what do memcache, MogileFS, and Gearman have in common? They are scalable, distributed technologies, and they can also interface with PHP, your ubiquitous web development language. Digg uses all 3 (and a few more) in its quest for social news domination, and this presentation shares what we’ve learned about them and how they are best utilized with PHP.
Flip (Video) For West Chester UniversityChris Penny
These slides focus on the design of an authentic video production project for undergraduate teacher candidates. Our goal was to help our teacher candidates understand the role of video as a teaching and learning tool, while at the same time creating authentic products for real schools.
The Beauty of Bootstrapping - Doing it AnywayChris Schultz
This is my presentation from The Feast Conference. Notes on the presentation are here: http://www.voodooventures.com/2009/02/12/the-beauty-of-bootstrapping-doing-it-anyway/
Slides from a presentation given at WordCamp Toronto in May 2009. Subject is "Making a living with WordPress in 2009".
The intended audience is designers and developers working with, or interested in working with WordPress.
The tips and advice come from our 5 years experience in doing things the hard way ;)
Presentation by Dennis Wingo on the Lunar Orbiter Image Recovery Project at t...Keith Cowing
"In 2007, the Lunar Orbiter Image Recovery Project (LOIRP) began a process to convert the Lunar Orbiter Images directly from the original analog video recordings of the spacecraft data to digital image format, a change which provided vastly improved resolution over the original images released in the 1960s. The first of these restored images were released in late 2008."
Reviews grammar and parsers and discusses my personal path toward writing my own packrat parser-generator for Erlang called neotoma.
Given to "Evil Robot Conference" on September 12, 2009.
The Atlassian suite of developer tools has grown in the last year, and we have some juicy new products to demo. Hear and see the latest on Stash, Bitbucket, FishEye, Crucible, Bamboo, and SourceTree.
Describes a high-level evaluation of why one would end up actually implementing a framework, how one should approach it, why one would do it, and then actually shows some examples of writing a Rack-based web application development framework called "Fuck".
Quick, what do memcache, MogileFS, and Gearman have in common? They are scalable, distributed technologies, and they can also interface with PHP, your ubiquitous web development language. Digg uses all 3 (and a few more) in its quest for social news domination, and this presentation shares what we’ve learned about them and how they are best utilized with PHP.
Flip (Video) For West Chester UniversityChris Penny
These slides focus on the design of an authentic video production project for undergraduate teacher candidates. Our goal was to help our teacher candidates understand the role of video as a teaching and learning tool, while at the same time creating authentic products for real schools.
The Beauty of Bootstrapping - Doing it AnywayChris Schultz
This is my presentation from The Feast Conference. Notes on the presentation are here: http://www.voodooventures.com/2009/02/12/the-beauty-of-bootstrapping-doing-it-anyway/
A presentation I gave at Pratt Institute on 09-Dec-09. I have all my notes up for the talk on my website: http://ntimsalazar.com/talks/welldesignedgoods.html I'm hoping to get them up here in the near future as well. Thanks for checking it out!
Connector Corner: Automate dynamic content and events by pushing a buttonDianaGray10
Here is something new! In our next Connector Corner webinar, we will demonstrate how you can use a single workflow to:
Create a campaign using Mailchimp with merge tags/fields
Send an interactive Slack channel message (using buttons)
Have the message received by managers and peers along with a test email for review
But there’s more:
In a second workflow supporting the same use case, you’ll see:
Your campaign sent to target colleagues for approval
If the “Approve” button is clicked, a Jira/Zendesk ticket is created for the marketing design team
But—if the “Reject” button is pushed, colleagues will be alerted via Slack message
Join us to learn more about this new, human-in-the-loop capability, brought to you by Integration Service connectors.
And...
Speakers:
Akshay Agnihotri, Product Manager
Charlie Greenberg, Host
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Jeffrey Haguewood
Sidekick Solutions uses Bonterra Impact Management (fka Social Solutions Apricot) and automation solutions to integrate data for business workflows.
We believe integration and automation are essential to user experience and the promise of efficient work through technology. Automation is the critical ingredient to realizing that full vision. We develop integration products and services for Bonterra Case Management software to support the deployment of automations for a variety of use cases.
This video focuses on the notifications, alerts, and approval requests using Slack for Bonterra Impact Management. The solutions covered in this webinar can also be deployed for Microsoft Teams.
Interested in deploying notification automations for Bonterra Impact Management? Contact us at sales@sidekicksolutionsllc.com to discuss next steps.
JMeter webinar - integration with InfluxDB and GrafanaRTTS
Watch this recorded webinar about real-time monitoring of application performance. See how to integrate Apache JMeter, the open-source leader in performance testing, with InfluxDB, the open-source time-series database, and Grafana, the open-source analytics and visualization application.
In this webinar, we will review the benefits of leveraging InfluxDB and Grafana when executing load tests and demonstrate how these tools are used to visualize performance metrics.
Length: 30 minutes
Session Overview
-------------------------------------------
During this webinar, we will cover the following topics while demonstrating the integrations of JMeter, InfluxDB and Grafana:
- What out-of-the-box solutions are available for real-time monitoring JMeter tests?
- What are the benefits of integrating InfluxDB and Grafana into the load testing stack?
- Which features are provided by Grafana?
- Demonstration of InfluxDB and Grafana using a practice web application
To view the webinar recording, go to:
https://www.rttsweb.com/jmeter-integration-webinar
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Albert Hoitingh
In this session I delve into the encryption technology used in Microsoft 365 and Microsoft Purview. Including the concepts of Customer Key and Double Key Encryption.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
12. 10 TEXT:HOME
20 GOSUB 100
30 END
100 ?“YES I JUST GOSUBBED FOR
NO REASON WHATSOEVER”
110 RETURN
Friday, June 12, 2009
13. “It is practicaquot;y impossible to teach
good programming style to students
that have had prior exposure to
BASIC: as potential programmers
they are mentaquot;y mutilated beyond
hope of regeneration.”
– Edsger W. Dijkstra
Friday, June 12, 2009
18. C HAD ENOUGH YET?
PROGRAM UGLY
WRITE(UNIT=*, FMT=*) 'FORTRAN!'
END
Friday, June 12, 2009
19. “[T]he infantile disorder”, by now
nearly 20 years old, is hopelessly
inadequate for whatever computer
application you have in mind
today: it is now too clumsy, too
risky, and too expensive to use.”
– Edsger W. Dijkstra
Friday, June 12, 2009
26. Get it done. Put the fire out.
Then forget about it.
Friday, June 12, 2009
27. Short, quick scripts
#!/bin/sh
for year in 1996 1997 1998 1999 2000; do
rm -rf backups/${year}
done
echo quot;Sorry, all backups from the pretend Internet money
era have been purged.quot; | /usr/ucb/Mail -s quot;Your restore
requestquot; boss@example.com
Friday, June 12, 2009
85. Why RCov Helps
• To reach full coverage,
you write more tests.
• As you write more tests,
you fix more problems.
• As you fix more problems,
you write better code!
Friday, June 12, 2009
86. Things To Look Out For
• RCov isn’t perfect.
• It will sometimes miss code that is
covered.
• It is easy to cheat.
• Just because it’s covered doesn’t mean the
code is awesome.
Friday, June 12, 2009
87. Reek
gem install reek
http://github.com/kevinrutherford/reek
Friday, June 12, 2009
88. Finds common smells
in your code.
quot;app/controllers/application_controller.rbquot; -- 3 warnings:
ApplicationController#username_for calls user.username multiple times (Duplication)
ApplicationController#username_for doesn't depend on instance state (Utility Function)
ApplicationController#username_for refers to user more than self (Feature Envy)
quot;app/controllers/groups_controller.rbquot; -- 5 warnings:
GroupsController#show calls params multiple times (Duplication)
GroupsController#show calls params[:page] multiple times (Duplication)
GroupsController#show calls params[:page].to_i multiple times (Duplication)
GroupsController#show has approx 6 statements (Long Method)
GroupsController#show/block/block is nested (Nested Iterators)
quot;app/controllers/sessions_controller.rbquot; -- 2 warnings:
SessionsController#create calls flash multiple times (Duplication)
SessionsController#create has approx 8 statements (Long Method)
quot;app/controllers/user_feeds_controller.rbquot; -- 3 warnings:
UserFeedsController#create calls logger multiple times (Duplication)
UserFeedsController#create has approx 6 statements (Long Method)
UserFeedsController#create has the variable name 'e' (Uncommunicative Name)
quot;app/helpers/application_helper.rbquot; -- 14 warnings:
ApplicationHelper::feed_date_for doesn't depend on instance state (Utility Function)
ApplicationHelper::feed_date_for refers to date more than self (Feature Envy)
ApplicationHelper::feedstitch_group_for doesn't depend on instance state (Utility Function)
ApplicationHelper::feedstitch_group_for refers to user more than self (Feature Envy)
ApplicationHelper::link_to_group_feed has 4 parameters (Long Parameter List)
Friday, June 12, 2009 ApplicationHelper::name_for doesn't depend on instance state (Utility Function)
89. Why Reek Helps
• Reek finds common
anti-patterns.
• Anti-patterns are bad habits
that are worth breaking.
• Fewer bad habits ==
better code!
Friday, June 12, 2009
90. Things To Look Out For
• Reek also isn’t perfect.
• It false-positives often.
• It can only make suggestions.
• It doesn’t catch all possible code smells.
Friday, June 12, 2009
91. Let’s Talk About
How My Code Smells
Or, The Part Of The Presentation That Is Potentiaquot;y
Very Embarrassing To The Presenter
Friday, June 12, 2009
92. MVC
Learn it. Know it. Live it.
Friday, June 12, 2009
94. Do As I Say,
Not As I Did
Actual client project, 2007 (I am not making this up):
• One controller
• One method
• ~130 LOC
• Actual comment:
# OPTIMIZE: this is ugly
Friday, June 12, 2009
96. Why???
• Didn’t understand the domain.
• Not thinking in object-oriented
paradigm.
• Not thinking in MVC.
• Not pairing.
• Lousy tests.
Friday, June 12, 2009
97. What Really Goes
In A Controller?
• Code you need to respond to a
web request and render the result
• Not business logic
• Not complex operations on
objects
Friday, June 12, 2009
98. Controller Liposuction
• Everything in its right place.
• When you see yourself doing
business logic, move it to the model!
• When you see yourself defining
view logic, move it to the view/
helper!
Friday, June 12, 2009
100. Finding Big Methods
• Too much stuff happening; too
many concerns
• Too many LOC to comprehend
in a glance
• Logic inside logic
Friday, June 12, 2009
101. def response
if @response.nil?
@final_response = false
current = source
path = source.query.nil? ? source.path : quot;#{source.path}?#{source.query}quot;
until @final_response
Net::HTTP.start(current.host, current.port) do |http|
@response = http.get(path, 'User-Agent' => user_agent)
if @response.header['location']
current = URI.parse(@response.header['location'])
path = current.query.nil? ? current.path : quot;#{current.path}?#{current.query}quot;
else
@final_response = true
end
end
end
end
@response
end
Friday, June 12, 2009
103. Remember
UNIX?
Small tools doing one
job well ⇒ small
methods doing one
job well
Friday, June 12, 2009
104. Name Methods To
Communicate Intent
thing.expires_at <
Time.now thing.expired?
user.has_accepted_terms &&
!user.suspended
user.can_sign_in?
Friday, June 12, 2009
105. Don’t Do Too Much
In A Method
• When you see a method getting too
long, break it into smaquot;er methods.
• Hint: look for excessive indentation
and nested ifs.
• Hint: a method shouldn’t come close
to filling your editor window.
Friday, June 12, 2009
106. def self.user_agent
quot;Awesome App Ruby/#{RUBY_VERSION}quot;
end
def self.maximum_redirects
4
end
def initialize(url)
@url = url
end
def endpoint_for(uri)
endpoint = uri.path.sub(/^/?$/, '/')
endpoint += quot;?#{uri.query}quot; unless uri.query.blank?
endpoint
end
def fetch(url, redirects_remaining)
return if redirects_remaining == 0
begin
uri = URI.parse(url)
response = Net::HTTP.start(uri.host, uri.port) do |http|
http.get(endpoint_for(uri), {'User-Agent' => self.class.user_agent})
end
if response.is_a?(Net::HTTPRedirection)
response = fetch(response['location'], redirects_remaining - 1)
end
rescue URI::InvalidURIError
RAILS_DEFAULT_LOGGER.warn quot;Error parsing URL: '#{url}'quot;
end
response
end
def response
@response ||= fetch(@url, self.class.maximum_redirects)
end
Friday, June 12, 2009
107. Self-Review
• Don’t check it in if the tests fail.
• Use continuous integration to keep
yourself honest. (more on this later)
• Look over all your changes before you
commit.
• If you miss something and you’re using
Git, fix it and git commit --amend
Friday, June 12, 2009
108. Peer Review
• Pair-program whenever you can. Pair
programming comes with built-in peer
review.
• Do regular code reviews with your peers.
During active development, weekly is
good.
• Listen to criticism. Don’t take it personaquot;y.
No one’s perfect.
Friday, June 12, 2009
109. Quality Takes
Time
By law, straight bourbon
must be aged in new, charred
oak barrels for at least two
years. Anything less yields
just whiskey, not bourbon.
Friday, June 12, 2009
134. Put it all together and
you will write better code.
Friday, June 12, 2009
135. The End.
This has been “Code Stinkers Anonymous”
by Mark Cornick. Thank you!
http://objectsinmirrors.com/
http://twitter.com/mcornick
Please rate this talk on SpeakerRate!
http://speakerrate.com/talks/1170
Friday, June 12, 2009