« first day (2013 days earlier)      last day (1167 days later) » 
00:00 - 16:0016:00 - 00:00

4:00 PM
@Hosch250 let's them choose which warehouse things come from, and makes it easier to split up packages when one item is not available. planning for that in the foreground is a cost-saving measure
savings for amazon, not USPS/etc.
@Hosch250 that reminds me when my cousin mikey started delivering for UPS. he's typically a lumberjack/tree-cutter but it was really slow after cleaning up post-storms. anywho, his beard is covers all of his cheeks, like up to the cheekbone just below the eye. UPS told him he had to be clean-cut and presentable to wear their uniform. apparently customers regularly make comments. he got reprimanded and eventually let-go for not being clean-cut and failing to regularly tuck-in his shirt
 
LOL.
 
which inherently makes me laugh because "clean-shaven" is now an illegal requirement.
trying to find the article on that; a black fellow sued his employer because he physically could not shave as shaving down to skin on the neck/face causes rashes and other health risks, which is apparently fairly common
google.com cannot be reached. well that's a fun error.
 
What's the best reason to close a question that is essentially, HLMGTFY?
 
Alphabet soup?
 
had lunch, must get the fu... YAK!
 
4:16 PM
I done thunk up a joke
How do you dis a programming language?
 
Tell them, "You're BASIC"
 
DadJoke++
 
rimshot**
 
Well, it is christmas cracker season coming up!
 
4:17 PM
jimmy fallon would laugh... i didn't, but he would
 
I can haz Soviet style "Warm Welcome" hat!
No idea what for, it's "secret"...
 
Probably a comment on a new user's post.
 
Mug's now defected from š¯… Oh CANADAš¯…  to š¯… Drink VODOKAš¯… !
If he get's a green Irish hat it'll be him drinkin' his Whiskey.
 
@IvenBach that is probably one of the most important insights about learning things
 
@FreeMan Upvote a user's first post.
 
4:35 PM
@Hosch250 i did that once, then they started adding a bunch of terribly written posts
 
LOL.
 
so i was browsing open vba questions on SO and in an answer i saw
"Always use Option Explicit"
is this, uh, actually the case?
 
^ generally considered a best practice
 
for beginners, yes
 
@Cyril when would be a good time not to?
 
4:39 PM
99.9999999999999999999999999999999999999999999999999% of the questions are from dabblers; always used option explicit... hell, turn that on as part of your options in the IDE so it does it FOR you
 
is hating how having all the Dim statements makes my code look a valid reason for not doing that
 
@SmileyFtW doing quick tests.
 
Where
is Mug when you need him? LOL
 
i mean with things like increment counters
 
@theVBE-it'srightforme hears an angry mug bust through a wall like the kool-aid man
 
4:40 PM
@theVBE-it'srightforme not really, no
 
or intermediate variables
 
@Cyril ok... but I do it out of habit and just don't think about it
 
dim as close to usage as possible and make small and modular procedures.
it may take a bit of getting used to, but it has vast benefits (including performance and intellisense)
 
i generally will dim for object variables
but i just hate having to say Dim i as Long when looping through something
 
why not for others?
 
4:42 PM
it will prevent issues with mistyping a variable name for driving you crazy
 
if you don't dim that it will be a Variant, which incurs boxing / casting costs for every access
 
let me google those lol
 
it's kinda like getting used to doing the dishes and putting them away right after a meal... may be a pain, but the benefits are real... keeps things neat and tidy
 
will an article about it in VB.Net be close enough
 
yea, should be
 
4:44 PM
ok
what about using a global increment counter
 
~shudder ewww.
avoid global state
also how would you do nested loops then?
 
unintended consequences... declare in the scope it's used and close to where it's 1st used
 
i'd just have like 5 or 6 declared so then whatever procedure can use them
 
why would you do that, though? just to avoid having a local Dim statement?
 
yes i hate how it makes the code look
 
4:47 PM
~ewwww, indeed!
 
it feels less readable to me
 
also if you have multiple procedures calling one another, you might inadvertently access the same counter
 
^ this!
 
which would result in incredibly hard to debug behaviour
 
4:47 PM
that could be funny tho!
yeah i see how this is a terrible idea lol
 
just bite the bullet :)
 
what about module level :3
that seems easier to track at least
 
still the same issue
 
:P
 
okay
if i turn it on in the VBE will it catch all the places i didnt explicitly declare things
 
4:49 PM
@theVBE-it'srightforme - have you been to Mathieu's Rubberduck WP site?
 
Name: "the VBE - it's right for me"; SO Membership: "2 days"; Posts: "1"
Guess a welcome is necessary. Hello!
 
@SmileyFtW yes i've read quite a bit there
but not everything i would gather from that question :p
@Cyril thanks!
 
Not to derail y'all or anything, but we've got 0-degree temps with -20 windchill.
#fun
 
@theVBE-it'srightforme there is a LOT there to digest. I go back to it regularly are reread articles that it thought I understood... and realize I miss a lot
 
@Hosch250 oh, thanks, I didn't notice.
 
4:53 PM
Balmy 40 deg F here in Texas
 
@Hosch250 niiiiiiice. that's a little better than ours; yesterday morning was 50 F, by dusk it was 17 F, getting down to 10 F with ~20 mph winds (feels like 5)
at least the sun is out to help?
better on a scale of shitty to shittier and your are paralax to the right threshold
lol
 
@SmileyFtW oh wow
@SmileyFtW they really do feel like essential reading for learning VBA
 
24°F, feels like 24°. Hey... warmer in Fairbanks, AK thank it is here!! (26° there!)
@theVBE-it'srightforme in chat, if you hover over a message, a little arrow will appear to the right side of the message. click that one and your message will link to that one.
 
@FreeMan like this?
 
@theVBE-it'srightforme like this. Then when you hover over this message, you'll see which one it's in response to. Helps to keep threads somewhat untangled.
 
4:58 PM
okay yeah i see
 
@theVBE-it'srightforme yes indeed!
 
got it
i had used that yesterday i think
but didnt notice the link back part
 
BTW, I head back to the RD blog and read and reread and rereread those posts. Sometimes, it takes a while to sink in.
@SmileyFtW You must not be in Houston, it's a balmier 50° there
 
@FreeMan that it most certainly does
lol sorry
i was cleaning my 4 key
 
Also, when someone links to one of your posts, you'll get a notification icon over there <--- click that and it'll take you to the mention. Handy if you've been AFK.
@theVBE-it'srightforme is this a regular occurrence?
 
5:04 PM
accidentally sending a spam message with one character?
or cleaning the keyboard?
@FreeMan that is useful, thanks
 
either...
 
well the answer is the same (no)
 
Then why differentiate?
 
i was just curious which one he was asking about
 
i'm still working on reading Clean Code. I've done a bit of skipping over chunks, e.g., the latter half of the forward, and just finished chapter 2. i guess it's always a good reminder to name appropriately, but reading and thinking about all of my laziness does help a bit and make me feel better about making appropriate changes to my laziness in the future... but maybe not all of it
i guess the one pro i feel best about is my hatred of l as a single letter (lowercase l) and i guess everyone else hates it, too... same as i don't use o (capital or lowercase) when using single letter variables (will try to not do that in the future)
i guess thanks @Hosch250 for getting me to actually pick up a book
...in a figurative sense
 
5:16 PM
Haha, I'm going to get my brothers to pick up a book too.
They aren't very much into reading, but I found one they'll love.
365 horrible, terrible, no good, very bad days in history.
Covering such interesting items as Caligula's brutal murder, the molasses flood in Boston, and more.
 
@Hosch250 i think i have one of those bathroom calendars with that
 
LOL.
I also got XKCD How To.
 
there're a couple hidden gems like "the day hitler was born" on april 20th
 
I imagine they'll like that too.
 
probably
i wonder if SMBC has a book. those are generally well encompassing, moreso than i feel xkcd hits on
hell, i have a few of thsoe printed for my wall at work. "Encryption by Destruction" is one of my favorites
 
5:24 PM
@Cyril Books
 
@this command button; i have historically input everything that should happen when i press commandbutton1_click inside of the code for the userform. do you feel it would be more appropriate to put those into a standard module and application.run() in the userform code?
@Mast thanks man! our internet is having issues with certain domains so i can't use google to have checked myself... but i could get to reddit lol
 
@Cyril Depends.
I don't feel that a standard module is the best place, though.
Typically, I find that when I need to implement a common functionality, I implement something akin to a behavior.
Meaning, I create a class module, write a Init routine that takes a CommandButton as an argument, then in the form's code-behind, it instantiates the new class, then give its button to the class.
Thus delegating the functionality to that class.
 
well, as class modules are on my list of things to read on, guess i will expedite that before moving forward with my project
 
OTOH, if it's purely UI, it probably is fine in the code-behind.
e.g. stuff like If Not .Validate() Then MsgBox "You suck."
 
5:31 PM
for my particular example, my UF has 2 comboboxes (list of currently open workbooks) so i can select source and destination workbook. the commandbutton dims src and dst workbooks and i start a slew of value=value as i loop through worksheets
 
Note that I've abstracted out the Validate - it's OK to use some other class or whatever to do the work, since the button is interactive and it should be assumed that classes don't get to be interactive but rather pass messages to the UI to do something.
Sounds like it should be a class.
How will you test it otherwise?
 
different versions of the source have different steps, etc., so i use a switch to determine startrow and ranges, etc.
ok
@this ...i press f8 and step through to test?
 
See, a class means that you can factor out the UI altogether
 
that was actually somethign i was talking to matt about the other day, as i'm not sure how else to test modeless
 
and therefore, you can write automated tests against that class
then in your userform, you would have only code that basically reacts to the messages that the class provides and show messagebox or whatever
by separating your UI and your business logic more cleanly, it's much easier for you to test your business logic without futzing with the userform.
 
5:34 PM
copy
sounds appropriate to do the same for userform_initialize, then, to populate my comboboxes
or maybe not... one array fills both, just the value of the second one is the current workbook name
sorry, got ahead of myself
 
Yeah, depending on the situations, really. Maybe the same class will be responsible for populating it. Maybe a 2nd class to do it.
You'd want a 2nd class if the method of population could vary and needs to be independent of what happens when both are selected.
That's the "S" in SOLID -- single responsibility
 
oh... combobox is the class, so one routine would make sense. just append the value in the initialize which is not specific to populating
yeah, i'm very bad about one intention in some of these modules. generally compartmentalized, but could be refactored to be more separate
thanks for the tips... back to work
 
um, yes, combobox is a class of itself but you'd have something like WorkbookDataSource class that would populate a given combobox. Then a WorkbookCopy class to do the actual copying between 2 given workbook.
 
now you'll be on the way to have a SOLID GRASP on coding!
 
5:58 PM
> **What**
Inspection Type: CodeQuality
Helping ensure the code is explicitly stating the type.

**Why**
Caught myself declaring a constant without including the type. This can have undesired side effects when using the const as a comparison in a RD unit test IE an `Integer` vs `Long` resulting in a type mismatch because of the oversight.

**Example**
This code should trigger the inspection:

```vb
Public Sub Foo()
Const bar = 0
End Sub
```

---

**QuickFixes**
Should Rubb
 
@Duga Forgive my half-baked possibly incomplete issue. In the middle of coding but still wanted to log this one. Apologies if it's already an inspection. Working with uncompilable code ATM ~.~
 
> If Thing implemented an ISomething interface, and we declared it like this:

1 Dim instance As ISomething
2 Set instance = New Thing
We would still be looking at a Thing, however we would now be seeing it through the lens of its ISomething interface, and the members we would get in the drop-down list when we typed instance., would be the public members defined in the ISomething class module.
What error is thrown by that code if Thing does NOT implement an ISomething interface?
 
iirc, a Type Mismatch RTE
 
6:19 PM
RTE, not compile time? That's handy.
 
That's why Max made those inspections.
 
 
1 hour later…
7:35 PM
@FreeMan North Central Texas - Cowtown
 
@SmileyFtW Lubbock!
 
@theVBE-it'srightforme Hopefully not still in school?
 
Hello fellow ducklings. I was wondering, at some point after 2007, does MSO migrate from the original VB6 form of VBA to something in the form of .Net..? What about that smog nonsense, MSO365..?
 
@theVBE-it'srightforme Luckenbock TX, where they're busy getting back to the basics of love...
 
7:49 PM
Hi Hosch!
 
@FreezePhoenix Hey.
 
How're you doing?
 
OK, how about you?
@spinjector Nope.
O 365 still has plain old VBA, and Office Online (the web-based version) has a TypeScript version.
 
Doing alright. Found an exploit in a game, told the dev, he said good job thats quite the lucrative use of that ps i like that idea i'll nerf it by making it harder and then an update rolled out with the nerf and i still can do it
 
Reminds me of my brothers and I in some web-based shooting games.
We found ways to climb the walls and drop behind them. So we were invisible behind the wall, and the walls were invisible to us.
 
7:57 PM
Oh nah this is a coding RPG.
Ohhhh
Birds eye view all the time over here
 
LOL.
Man, who has coffee over here??
It's a horrible smell.
BLECH.
And no, not all coffee smells are equal. And this is some of the worst I've ever smelled.
 
@theVBE-it'srightforme Just wondering if you're at Tech or not... going to school
 
So does RD still work even with O365,,?
I thought O365 is the 'online' version. Are they not the same thing?
 
8:14 PM
MS is conflating the online and local apps by calling them both 365. The splash screen for my local apps shows )365
 
@spinjector Well, you get access to both.
But you still get the desktop ones too.
 
Everything is O365 nowadays, it's confusing indeed.
 
8:32 PM
I despise 365. The UI give me fits. I'm like die die die die, lol. =-D
Should probably just switch to linux and libre or openoffice, but then no RD. =-S
 
8:44 PM
You can get those on Windows. They aren't very nice, I think.
 
9:04 PM
@SmileyFtW oh no, I just watch too much college football
@SmileyFtW so it was the town i thought of
though i dont think i could actually name another town/city in that part of texas anyways
@spinjector revert back to office 2010/3 :p
 
9:30 PM
argumentModesFromSpecifier :: Int -> Maybe [ArgumentMode]
argumentModesFromSpecifier 0 = []
argumentModesFromSpecifier x
    | x < 0 = Nothing
    | otherwise = let argumentMode = toArgumentMode (x `mod` 10)
                    in case argumentMode of
                        Nothing -> Nothing
                        Just mode -> let furtherModes = argumentModesFromSpecifier (x `div` 10)
                                        in case furtherModes of
                                            Nothing -> Nothing
@Vogel612 As the local Haskell expert, is there a better way to do this?
It feels a bit clumsy.
 
for one you can definitely simplify things with divmod
what you're basically doing AFAICT is transforming each digit in the base 10 representation into an ArgumentMode, right?
 
Yes, but rather in a Maybe ArgumentMode since not all digits are mapped.
This would be rather short if not for the Maybe.
 
so there is the Data.Digits package that allows you to transform Integrals to lists of their digits in arbitrary bases
 
Interesting to know.
For another of the challenges for Advent of code, I have written my own toDigits method using div and mod.
Using a library is much better, though.
 
also the second level case statement can not go into the Nothing branch, IIUC
 
9:40 PM
Why?
 
because you handle the < 0 case in the top level pattern matching
and argumentModesFromSpecifier 0 = []
 
Currently, only 0 and 1 return an ArgumentMode and everything else Nothing.
So the second would be Nothing for 61.
 
you'll have a much easier time just filtering the return values
 
Thank you!
 
alternatively you could return a [Maybe ArgumentMode], I think
is this the current advent of code challenge?
 
9:43 PM
It is from day 5.
I do it in Python and try to also do it in Haskell.
 
I think you'll have an easier time fulfilling the requirements if you return a [Maybe ArgumentMode] instead
so basically you'd have argumentModesFromSpecifier = (map toArgumentMode) . digits
 
Thanks, that looks a lot more reasonable.
 
don't forget to pad the result list with Nothings when you process it :)
 
I have to admit that doing it in Haskell adds some further complications.
Apart from me not knowing the language well.
 
10:00 PM
yea, state representation is a bit of a royal mess if you don't know your way around
 
10:34 PM
Soo many compile errors...
 
10:48 PM
Argh, I should really learn at some point where I have to use parentheses and where not.
 
:grumble: Trying to code when there is stateful access everywhere of a workbook is an impossible task to get correct.
> Tentatively got new feature request to work. :test test: Nope forgot about that. :test test: That doesn't work either :test test: Ooof that too :test test: Well FML this ain't never gonna work like they want.
 
11:09 PM
Working at this pond fundamentally has changed my thinking WRT coding.
 
OMG, finally, it compiled.
 
yay for haskell, I guess :)
the compiler messages really take some getting used to
 
and i does not work :-(
index too large
 
11:27 PM
would that be an message one'd get if there was an infinite recursion?
 
No, I simply have one element too few in my list.
The annoying thing is that the terminal does not tell you where in your code that error come from.
Ok, that bug was not too obvious: length operationModes - length specifiedArgumentModes
The problem is that specifiedArgumentModes is Maybe [Something] and not [Something].
Unfortunately, length is also defined for Maybe a.
 
00:00 - 16:0016:00 - 00:00

« first day (2013 days earlier)      last day (1167 days later) »