« first day (699 days earlier)      last day (3617 days later) » 

22:00
SELECT "WEEKEND!!"; GO
Back later maybe
later!
just got a random +1 on that one!
3
A: How to unit test Excel VBA code

Mat's Mug Disclaimer: I own Rubberduck's GitHub repository, and I'm one of the devs involved in the project. Rubberduck is under active development. It's much more than a unit testing tool for VBA though, but it works pretty well and lets you write VBA unit tests pretty much without any boilerplate: ...

Oh gotcha.
I misread it then.
I thought you were suggesting that people were offering to write ERP software for free.
Because anyone that is making that offer: wordmachinery.com/careers.aspx
@nhgrif Go post that in the SalesForce chat.
Or do they not use .NET?
I don't know.
@nhgrif Is your job the VB.NET/SQL one?
At the very bottom?
I'll talk to my parents about it, if you think my recent questions show enough potential to bother.
Seeing as I can't get out there by myself, I can't just say yes/no.
Need to get my driver's license still.
22:17
My job isn't on there. I have about 17 million hats at this point.
The job at the bottom is the one I'm interviewing people for.
Yeah, that is what I meant.
Does it matter that I don't know VB.NET or SQL?
well...
technically, VB.net and/or SQL Server a plus doesn't read as a firm requirement ;)
OK, I just saw the title.
You know .NET. You have enough time between now and whenever an interview is scheduled to pass a very basic skills test in VB.NET and SQL.
like, "System.String. value type or reference type?"
?
22:23
OK, I'll write a FizzBuzz in VB.NET and another in SQL (how would I do this?) and post them for review.
@Mat'sMug A value type, right?
Most C# classes are reference types.
a class is a reference type by definition
string is a type, but it passes by value.
System.String is a reference type, with value type semantics
it's immutable
22:25
Oh, I was thinking of the semantics.
Yes, I know it is immutable.
what language keyword corresponds to a System.Int32 in VB?
I'm being annoying, sorry
Integer?
I don't know VB one bit.
correct.
knowing the language is just a set of quickly-earned rules. knowing the framework matters most.
OK.
Thanks for clearing that up about types and type semantics.
like, how do go about serializing objects to XML, whether it's VB or C#, the code will be calling the same methods from the same objects
22:30
I knew a custom type was a reference type with reference semantics, but I was confused about why string wasn't passed by reference automatically.
@Hosch250 Don't write FizzBuzz in SQL.
^^ and that
Why not?
because it doesn't prove anything... except that you know how to misuse SQL...
22:31
IMO
and it was done before...
LOL, that would be a funny implementation.
Was it?
horrible
0
Q: Selection Sort Sub-Optimal Code?

FabZerosWhy is this code "bad"? In all of the selection sort codes I am learning from, they do it much differently. I will learn the proper code from the book, but I would love to know why this particular code is bad... Thanks! public class Main { public static void main(String[] args) { int[] arra...

28
Q: Tired of FizzBuzz yet?

sᴉɔuɐɹɥԀThere have been many FizzBuzz questions lately, and here is one more! Granted, it is pretty straightforward to do FizzBuzz with SQL using calculations. So instead, I'm going to do a FizzBuzz which will not only be functional, but demonstrate some of the core functions of SQL in general and MySQL...

0
A: Without #import, does Swift have its own easy way to detect circular dependencies?

nhgrifIf you want to modularize your Swift code, you should be using modules! Creating a new module is pretty simple. Add a new target to your project by clicking the plus sign here: Select "Framework & Library" for the appropriate platform (iOS/OS X): Choose "Cocoa Framework" (or Cocoa Touch, ...

upvt pls
I don't think the OP will be too happy with this answer.
22:37
why? sounds full of wisdom!
> If you want to modularize your Swift code, you should be using modules!
Module Module1
    Sub Main()
        For index = 1 To 100

            If index Mod 3 = 0 Then
                Console.Write("Fizz")
            End If

            If index Mod 5 = 0 Then
                Console.Write("Buzz")
            End If

            If index Mod 5 <> 0 And index Mod 3 <> 0 Then
                Console.Write(index)
            End If

            Console.WriteLine()
        Next
    End Sub
End Module
Yeah, but it requires creating modules. He's used to Objective-C (which works like C, C++, etc.
.h, right
@Hosch250 If I interview you, I won't give you a FizzBuzz question... but if you know that FizzBuzz is a common interview question, you should write it better than that.
@nhgrif OK.
22:39
Function FizzBuzzify(ByValue Value As Integer) As String
Sub FizzBuzz(ByValue MinValue As Integer, ByValue MaxValue As Integer)
and in main,
FizzBuzz(1,100)
Alright.
hint: VB has an Else keyword ;)
@Mat'sMug Yeah, I know.
This has three conditions, though...
I'm not sure you want an Else in that approach.
Swift programmers are mostly people coming from Objective-C. We're not used to projects that are organized like this.
Even though these frameworks have been available in Xcode for a long time, the only reason you'd ever use them is if you were writing a library.
And even then, you have to distribute the public headers with the compiled library binary file, and someone has to import each of the .h files.
Although if you're writing your library correctly, you make one public .h file that has all of the public files (or at least one that imports all the others).
@nhgrif oh nevermind, I missed the Write vs WriteLine part.. nice.
22:48
Module Module1
    Function FizzBuzzify(ByVal Value As Integer) As String

        If Value Mod 5 = 0 And Value Mod 3 = 0 Then
            Return "FizzBuzz"
        End If

        If Value Mod 3 = 0 Then
            Return "Fizz"
        End If

        If Value Mod 5 = 0 Then
            Return "Buzz"
        End If

        Return Value
    End Function

    Sub FizzBuzz(ByVal MinValue As Integer, ByVal MaxValue As Integer)
        For index = MinValue To MaxValue
            Console.WriteLine(FizzBuzzify(index))
That better?
I like (sort of) how I don't have to cast my Integer to return it as a String
VB handles that for you
that's double-edged though
(and a reason why I don't like VB much)
Yeah, I like to have to explicitly cast it.
Same reason I don't like using var.
but var doesn't imply any type conversions...
No, but it makes me know what exactly I am using.
Is it an IEnumerable or an IList?
IList is an IEnumerable - the question is, are you .Adding to it, or just iterating it?
if you're only iterating items, IList is the wrong interface to use
22:52
I am getting better at knowing what is what immediately, but I feel safer typing it out still.
I had a bit of trouble when I tried using LINQ to get some values from a Dictionary.
you know you can hover var and the IDE pops a tooltip that shows you the type it's resolving?
It returned an IEnumberable<KeyValuePair<Key, Value>>, and I was expecting a Dictionary<Key, Value>
No, I didn't.
That makes me rethink it.
Well, a dictionary is a ien<kvp> in essence
@JeroenVannevel Yes, but they have different LINQ methods.
22:55
isn't LINQ extending IEnumerable<T>?
Dictionary has more.
@Mat'sMug before compilation?
0
Q: FizzBuzz Kickoff

Hosch250My first FizzBuzz question (well, I asked, then deleted, one previously), and my very first VB.NET question. Module Module1 Function FizzBuzzify(ByVal Value As Integer) As String If Value Mod 5 = 0 And Value Mod 3 = 0 Then Return "FizzBuzz" End If If Valu...

hmm, interesting. Can't do that in Swift.
But I can do something else quite cool...
22:58
var != dynamic
Swift doesn't have dynamic types.
lol I was going to ask "but.. COM interop?" but nevermind ;)
doesn't iOS have its own little oddities?
hmm?
What do you mean?
well, Windows' COM stuff has some code that was probably written back when printers could play eye of the tiger...
uh
Objective-C is exactly as old as C++, basically.
23:03
shit that printer rocks!
1
Q: FizzBuzz Kickoff

Hosch250My first FizzBuzz question (well, I asked, then deleted, one previously), and my very first VB.NET question. Module Module1 Function FizzBuzzify(ByVal Value As Integer) As String If Value Mod 5 = 0 And Value Mod 3 = 0 Then Return "FizzBuzz" End If If Valu...

My iOS simulator is being slow right now... and I don't know how to show you what I want to show you with OS X...
hang on
@Mat'sMug Is Sub() for void and Function() for everything else?
you could say that. properties have their own keyword, too
yeah.
Property Foo() As Integer
23:21
@Hosch250 Maybe like this? ;)
28
Q: Tired of FizzBuzz yet?

sᴉɔuɐɹɥԀThere have been many FizzBuzz questions lately, and here is one more! Granted, it is pretty straightforward to do FizzBuzz with SQL using calculations. So instead, I'm going to do a FizzBuzz which will not only be functional, but demonstrate some of the core functions of SQL in general and MySQL...

@sᴉɔuɐɹɥԀ Something
I was hoping that'd show me all the colors within the dictionary, but oh well. Still get this. I guess that's not all that special though,
@Mat'sMug Should I do it C# style, with main() at the top, or C++ style, with main() at the bottom?
@Hosch250 generally speaking, main() should be the only thing in the file...
23:23
It was kind of fun doing FizzBuzz in a set-based manner rather than loop-based.
generally
Oh.
I thought main() should only do any initialization work that can't be done elsewhere, and should be small?
Yep.
Then why split it up like this?
Split what up?
23:24
The module?
@nhgrif ^^ not sure how much of it is native VisualStudio vs what R# gives me though
In a real project, you wouldn't put those functions in the same file as main.
@Mat'sMug Is that pop-up menu because it's letting you autocomplete a color you're initializing with?
23:26
that's IntelliSense
Yes, but what I mean is...
hang on, I'll show you
I mean, I'm in the middle of typing "red" on that screenshot
right
Swift is more powerful than that.
And it works for any color value (RGBA)
In C#, I can press "Enter" to utilize Intellisense. VB.NET doesn't do that :(
If that was a random 0/1/2 instead of a hard-coded 1, it would still work.
Or if I initialized with random values.
23:31
I find the little underline less annoying though
Why can't they just standardize these things.
just enough to tell you what the actual color looks like
but that's R# magic
C# uses private by default, VB uses public...
because VB has a background
comes from VB6
Oh.
But VC++ isn't C++.
23:33
and was written to please a VB6 crowd back when VB6 was all the hype and .net was the "new thing"
the contorsions they made...
wasn't well-received anyway
What's less annoying?
@Hosch250 I prefer seeing the higher abstraction levels at the top, and the details at the bottom. so main would be first
OK, I'm doing it that way in this current project.
@nhgrif wait, what's that screenshot showing exactly?
That particular screenshot is from the playground. Everything in the right hand slightly off-black area is realtime debug info.
In a non-playground project it's not there.
but you can still get the quicklook preview.
23:36
oh. my shots are design-time
That's design time.
but it's playground design time.
Swift's playground is magic.
lol
sorry I read realtime debug info as "there's a debugger attached, code is running"
I'm voting to close this question as off-topic because questions about improving code belong on codereview.stackexchange.com — Barmar 52 secs ago
The code is running. It's design time. Swift's playground is magic.
doublethink. brain freezes
23:39
Swift's playground is magic.
@Duga You're kidding, right?
@Barmar Answer's aren't part of the question. His answer might be appropriate for Code Review, but his question definitely isn't, and his question definitely isn't a question about improving code. — nhgrif 1 min ago
that question is a mess
30
Q: What privilege should 30k users get?

Jon EricsonThe last time we lifted the level cap was in 2011. Last year, we added a unilateral close-as-duplicate power for gold tag badge holders, but no new reputation level. So we've been thinking about giving users more reasons to keep playing. (I've answered this question with some circumstantial evide...

oh nice
None. 30k users are no better at moderating than 20k users. In fact I've seen way to many who don't even know the basics of SE principals. New moderator privileges should be rewarded based on moderation experience rather than reputation as reputation does not correlate much with ability to moderate, especially at higher rep levels. — bjb568 5 hours ago
23:51
If this actually held, I would pretty much have editing privileges network-wide. :-/
3
RELOAD!

« first day (699 days earlier)      last day (3617 days later) »