Skip to content

Instantly share code, notes, and snippets.

Ok, I came up with an example.

Programming is like doing a massive sudoku. But you’re not just doing your own square; you have to line up the edges with squares that you’ve already done, or squares other people in your team are working on.

And it’s not just squares that you’ve done — you have to anticipate the sudokus you’ll be doing days, weeks or months from now, and leave easy numbers at the edges so it isn’t impossible to do those squares.

And that’s why some programmers are so engrossed in it, and get all worked up, because they’re like “You left a 5 in the middle of the square, what kind of asshole does that, now I’m gonna have to line all my squares up with that.”

And then someone points out a bug, and you have to trace it back to the square it came from, and then redo that square without screwing up all the other ones.

[3/5/18 13:51:32:030 EST] 0000003a UPSStreetLeve I Entering com.trifecta.wc.util.UPSStreetLevelAddressValidationUtil resetNOOfFailedAttempts(CommandContext ctx)
[3/5/18 13:51:32:030 EST] 0000003a UPSStreetLeve I Exiting com.trifecta.wc.util.UPSStreetLevelAddressValidationUtil resetNOOfFailedAttempts(CommandContext ctx)
[3/5/18 13:51:32:030 EST] 0000003a UPSStreetLeve I Exiting com.trifecta.wc.util.UPSStreetLevelAddressValidationUtil handleUPSResponse(String upsAdrValidationResp)
[3/5/18 13:51:32:030 EST] 0000003a UserRegistrat I com.trifecta.perfumania.commands.controller.UserRegistrationAddCmdImpl checkZipCode enteredaddress details in ura latest == John_Connolly_2 Cinque Ln__Bayport_NY_11705
[3/5/18 13:51:32:116 EST] 0000003a EJBMDOrchestr A CNTR0098I: Container-managed pre-find persistent store synchronization disabled for bean: "WC_perfdev#Member-MemberManagementData.jar#Address".
[3/5/18 13:51:32:158 EST] 0000003a EJBMDOrchestr A CNTR0098I: Container-managed pre-find persistent store synchr
@jconnolly
jconnolly / Amortized.md
Created December 14, 2015 13:51
Amortized vs Average

Meaning of amortized

I feel like I have a vague understanding of what an amortized analysis is. From what I've noticed, it's the time if the action in consideration is done a large number of times (on a large data set?). I know it's in contrast to worst-case cost analysis but if anyone has any helpful ways to explain it and how to find amortized cost, that would be great.

Instructor. 15h

You can think of amortized a little like "average", but there's a subtle difference.

Average involves a random process. Amortized does not.

# example_publisher.py
import pika, os, logging
logging.basicConfig()
url = 'amqp://guest:guest@localhost:5672/%2F'
params = pika.URLParameters(url)
params.socket_timeout = 5
connection = pika.BlockingConnection(params) # Connect to CloudAMQP
channel = connection.channel() # start a channel
import pika, os, logging, time
logging.basicConfig()
def send_email(msg):
print msg
print "sending email"
time.sleep(5) # delays for 5 seconds
print "email sent";
return;
javascript:(function(e,a,g,h,f,c,b,d)%7Bif(!(f=e.jQuery)%7C%7Cg%3Ef.fn.jquery%7C%7Ch(f))%7Bc=a.createElement(%22script%22);c.type=%22text/javascript%22;c.src=%22https://ajax.googleapis.com/ajax/libs/jquery/%22+g+%22/jquery.min.js%22;c.onload=c.onreadystatechange=function()%7Bif(!b&&(!(d=this.readyState)%7C%7Cd==%22loaded%22%7C%7Cd==%22complete%22))%7Bh((f=e.jQuery).noConflict(1),b=1);f(c).remove()%7D%7D;a.documentElement.childNodes%5B0%5D.appendChild(c)%7D%7D)(window,document,%221.3.2%22,function($,L)%7B$('%23header,%20.pagehead,%20.breadcrumb,%20.commit,%20.meta,%20%23footer,%20%23footer-push,%20.wiki-actions,%20%23last-edit,%20.actions,%20.header,%20%23wiki-rightbar,%20.gh-header-actions,%20.sunken-menu-contents,%20.site-footer').remove();%20$('%23files,%20.file').css(%7B%22background%22:%22none%22,%20%22border%22:%22none%22%7D);%20$('link').removeAttr('media');%7D);
@jconnolly
jconnolly / gist:6761572d49914b079419
Last active August 29, 2015 14:04
best metal/metalcore/hardcore songs
meshuggah - bleed
earth crisis - gommorah's season ends
coalesce - giving up
converge - 3 day romance
sons of abraham - termites in his smile
dillinger escape plan - 43% burnt
cave in - programmed behind
pelican - the tundra
(j/insert! connection :recruiter_suggested_candidate
{:job_id 100 :jobseeker_id 101 :recommendation_score "" :create_time (mysql-now) :creator_id "10101"}
{:job_id 101 :jobseeker_id 102 :recommendation_score "" :create_time (mysql-now) :creator_id "10101"}))
@jconnolly
jconnolly / gist:8045428
Created December 19, 2013 20:11
OVal class-level validation butchery I just wrote.
@ValidateWithMethod.List({
@ValidateWithMethod(methodName = "validateRecruiterId", parameterType = Job.class, errorCode = "job.recruiterId.invalid"),
@ValidateWithMethod(methodName = "validateJreqJobHasValidApplication", parameterType = Job.class, errorCode = "job.application.invalid"),
@ValidateWithMethod(methodName = "validateJreqCompanySize", parameterType = Job.class, errorCode = "job.company.size.invalid")
})
@jconnolly
jconnolly / gist:7777758
Created December 3, 2013 21:26
ldap craps the bed
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/opt/graphite/webapp/graphite/account/views.py", line 31, in loginView
user = authenticate(username=username,password=password)
File "/usr/lib/python2.6/site-packages/django/contrib/auth/__init__.py", line 60, in authenticate
user = backend.authenticate(**credentials)
File "/opt/graphite/webapp/graphite/account/ldapBackend.py", line 37, in authenticate
resultType, resultData = conn.result( resultID, 0 )
File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 436, in result