January 2010
1 post
hi i’m a client
here’s 100 change requests i came up to prove to my boss that i actually did something today.
they will make your hard work look ugly.
i will ask why it looks ugly, because i have no idea how to design an interface, develop an application, or produce a real deliverable - mostly because i’m used to working without thinking.
also, why do none of my change...
December 2009
2 posts
Public Sub findLink()
Dim ws As Worksheet
Dim rng As Range
For Each ws In ThisWorkbook.Worksheets
For Each rng In ws.UsedRange
If InStr(rng.Formula, “”) > 0 Then
Debug.Print (ws.Name & ” - ” & rng.Formula)
End If
Next rng
Next ws
End Sub
Public Sub ok()
ThisWorkbook.Names(“inputs”).Delete
End Sub
Public Sub ok2()
‘ThisWorkbook.Names(“inputs”).Delete
Dim rng As Range
Set rng = ThisWorkbook.Worksheets(“Sheet1”).Range(“D10”)
‘Dim rng2 As Range
‘Set rng2 = ThisWorkbook.Worksheets(“Sheet1”).Range(“E77”)
Dim x As Integer
Dim y As Integer
...
October 2009
2 posts
Option Explicit Public Sub Whatever() Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets ws.Activate ws.Visible = xlSheetVisible ActiveWindow.ScrollColumn = 1 ActiveWindow.ScrollRow = 1 ActiveWindow.Zoom = 100 Next ws End Sub
lonely without my impediments
September 2009
3 posts
and if you have to leave, then fucking leave.
but don’t think about leaving without leaving something behind.
and if it’s just a failed relationship, then so be it.
at least you chose to exist at all outside that head you call home.
“i know it’s an awful thing to say, but someone had to tell you.”
if it’s not love, it’s time. if it’s not time, it’s money. if it’s not money, it’s health.
there will always be something.
always.
even if, to the observer, you seem to have it - you’ll still seem to want it. or it doesn’t feel like you imagine it would....
August 2009
31 posts
Half of being a good, competent software developer is realizing that...
– Coding Horror: On the Meaning of “Coding Horror”, Jeff Atwood
should i…
i write good code slowly
or poor code quickly
?
a girl’s measurements should be: pupil size in picas, warmth of breath in kelvin...
– _why’s twitter (cached by favstar)
these painful client requests are getting easier to swallow.
one thing i never realized happened in the “real world” is that clients will actually ask you to undo changes you’ve made. that’s fine, my code doesn’t always match up to what the client wants.
however, occassionally a client asks for something to be changed back which ends up making the program worse....
10000 records added. 20000 records added. 30000 records added. 40000 records added. 50000 records added. 60000 records added. 70000 records added. 80000 records added. 90000 records added. 100000 records added. 110000 records added. 120000 records added. 130000 records added. 140000 records added. 150000 records added. 160000 records added. 170000 records added. 180000 records added. 190000...
The singleton pattern is an improvement over global variables. It avoids...
– Gamma, Erich, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software.
i wish i could...
relax
not panic about every single social occassion
relax
drink again
relax
drink
relax
drink
relax
drink
relax
drink
relax
drink
know that all this suffering is not for nothing
know that one day i will make it
know that i won’t be alone forever
Interfaces are fundamental in object-oriented systems. Objects are known only...
– Gamma, Erich, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software.
Requests are the only way to get an object to execute an operation. Operations...
– Gamma, Erich, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software.
Reset scroll position, add to workbook open sub
ActiveWindow.ScrollColumn = 1 ActiveWindow.ScrollRow = 1
Experienced object-oriented designers will tell you that a reusable and flexible...
– Gamma, Erich, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software.
Model-View-Controller
Must research this a lot more. I think I should be using ASP.NET’s MVC program to set up. Should see if that supports MS SQL 2005 or needs MS SQL 2008, if it can run on windows server 2003 or not. hmms hms hms.
This Job Will Kill Me
let me get one thing straight: i love programming. i love building, i love compiling. i absolutely hate bugs - but the satisfaction that i get from successfully killing them is unparrarelleled in anything else i do.
you know that office space question, what would you do if you were given a million dollars?
well, i’d do nothing too, for a while.
but after a few weeks, i’d start...
In reality, the success of a project is measured by how well it meets the...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
Hungarian notation (where you encode the variable’s type information in...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
We like to see a simple module-level header comment, comments for significant...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
Never become a slave to a methodology; circles and arrows make poor masters....
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
As a Pragmatic Programmer, you should tend to view requirements gathering,...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
Test your software - or your users will.
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
Refactoring often involves making many localized changes that result in a...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
Refactoring your code - moving functionality around and updating earlier...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
Accidents of implementation are things that happen simply because that’s...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
Kaizen
So next time you see a piece of code that isn’t quite as it should be, fix...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
Don’t try to refactor and add functionality at the same time.
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
Whenever you find yourself writing a simple loop, you know that you have an O(n)...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
Don’t be a slave to history. Don’t let existing code dictate future...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
A good way to stay flexible is to write less code. Changing code leaves you open...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
Deallocate resources in the opposite order to that in which you allocate them.
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
July 2009
9 posts
here’s what they don’t teach you in school about this shit.
you write x lines of code, you’re going to have y number of critical bugs.
i don’t care who you are, how fucking good you are, how many lines you’ve written total, you’re going to get that critical motherfucking bug that you didn’t catch and it slipped through and i’m sure you could come...
We are constantly interfacing with other people’s code - code that might...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
Tools amplify your talent. The better your tools, and the better you know how to...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
The analogy might be violent, but it applies to new projects, particularly when...
– The Pragmatic Programmer, From Journeyman to Master (Andrew Hunt, David Thomas)
using excel to interact with an oracle database...
don’t use a semicolon at the end of your query. you will get invalid character and want to shoot yourself in the face after debugging for several hours.
get control type from control...Excel!
For Each cCont In Me.MultiPage1.Pages(0).Controls If TypeName(cCont) = "TextBox" Then 'DO STUFF HERE End If Next cCont
reference to objects... is it really this easy?
Dim dd As Object Set dd = ThisWorkbook.Sheets(“Main”).DropDowns(“ddRetailer”) dd.ListIndex = 1
Pivot Tables and Pivot Caches
For Each objPivotTable In buildWorksheet.PivotTables objPivotTable.TableRange2.Clear Next Set worksheetpivotCache = ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:=dataRange) Set objPivotTable = worksheetpivotCache.CreatePivotTable(TableDestination:=buildWorksheet.Cells(1, 1), TableName:=”PivotTable1”)
June 2009
1 post
Disappearing Controls, Excel 2003
One of the most frustrating issues with developing in Excel are all the quirks that seem to pop up. I’ve wasted almost 2 or 3 hours today dealing with this issue: for some reason, way unknown to me, Excel will delete controls that I have drawn and placed onto worksheets. (I haven’t noticed this behavior happen with userforms.)
This usually happens when I have copy and pasted controls....