« first day (604 days earlier)      last day (3710 days later) » 
00:00 - 21:0021:00 - 00:00

21:01
I'll look through it, but I may not be able to do anything before school starts.
@Mat'sMug Your VBA project?
Rubberduck, yeah
Ah yeah, you are so confusing about naming Rubberduck and having a @RubberDuck here
What we have works for the code inspections that are implemented, and can work for some of the ones we want to implement, but for things like detecting unreacheable code, the parser as it is implemented right now can't cut it
I might as well call my HearthStone logreader SimonAndréForsberg for that matter
21:04
lol
@skiwi Yeah.... blame the Mug. He named it. (Although, I am still honored.)
But I don't know, I think making an IDE is not exactly easy there
It's not an IDE, just an add-in for an existing one...
Ah, like ReSharper?
2
Trying to join this late in the project is awful.
Everything is referencing everything else, and I won't have any idea of what is going on until I read the entire project.
@Mat'sMug What is a logical line of code?
21:09
@skiwi In fact, @Mat'sMug keeps mumbling about being ReSharper for VBA when he thinks no one is listening.
@Hosch250 It's okay. I don't understand the parser either.
Would that be the semi-colon in C#?
@RubberDuck Ha, ice
ice nice
A logical code line is something like this.
aVar = New (param1, _
           param2)
OK, so basically, the logical line is ended by the semi-colon in C#?
It's one logical line of code, but two physical lines of code.
21:10
That is what I thought.
Yeah. In VBA it's a new line unless there's a line continuation (underscore)
@Hosch250 VBA lines of code are terminated by a newline - but you can "continue" a line of code on the next physical line with an underscore
But.... there's this too. There's the colon.
Dim aVar As Variant: aVar = bVar
That ^ is two logical code lines on a single physical line........
@Mat'sMug Does the underscore have to be the very last character, or is whitespace ignored?
21:12
I seriously hate whoever originally designed this....
@RubberDuck nope. That's one phys./logical line of code, with two instructions ;)
2
So why exactly VBA?
Why is it even popular?!
Because..... masochism.
Because you can write macros in Office with it.
@Hosch250 the underscore / line continuation must be preceded by a whitespace and followed by a newline
21:14
Well, it's popular because it's built into Office and still the easiest way to automate Office.
So yeah, must be he last character on the line.
OK, so it cannot be " _ \n", it has to be " _\n"?
VSTO and Apps are nice, but VBA is still king in the office world.
OK.
@Mat'sMug Can you tell me why you always use IEnumerables?
Why in the world aren't you using an ObservableCollection<string>?
Why would I need an observable? The API doesn't notify of changes in the source code...
21:16
OK, a List<string> then.
Wouldn't that be easier?
Let me write a quick example of what we just discussed.
Could be that. But I like to yield stuff.. eventually would like to use some async code to do the parsing
Oh, I see.
Well, no, I don't really.
Basically, a List can't work with those?
Yeah, but I don't think I really need more than an IEnumerable here..
0
Q: Refactoring Python class

user2589328Background I created a simple class to reflect emotion classification based on the Lovheim cube. The code is not scientific at all, and I just did it for fun, but I want all code I write to be as Pythonic and efficient as possible, so I was hoping for some help refactoring it. Code Purpose Cla...

@Mat'sMug So does this correctly parse the syntax of VBA?
        static void Parse(ref string[] s)
        {
            List<string> afterParse = new List<string>();

            for (int i = 0; i < s.Length; i++)
            {
                if (s[i].EndsWith(" _"))
                {
                    s[i] += s[i + 1];
                    s[i + 1] = "";
                }

                if(s[i] != "")
                {
                    afterParse.Add(s[i]);
                }
            }
        }
Unless the line is split over more than 2 lines.
I would need to fix that.
21:23
That's basically the SplitLogicalLines method.. I wrote a LogicalLine struct to hold some more information than just a string
OK.
OK, so where does the rest of the parsing come in?
a LogicalLine has a SpltInstructions method to give me all instructions on a line of code - and then rhe parser iterates all instructions against the syntaxes
The "real deal" is basically in the Parser.ParseCodeBlock method.
Oh, so the parser methods make sure the code is the right syntax?
Well it assumes the code is compilable
I think it's a fair assumption to make - I'm not writing an IDE ;)
If the code is compilable, why does it need its syntax checked?
21:27
And you're writing the VBA plug-in in C#?
or is that also VBA
Yeah
That Parse method looks difficult
@Hosch250 so we can inspect the code and find undeclared variables, functions that return an implicit Variant, parameters passed ByRef implicitly, etc..
21:28
But I cannot suggest much without knowing much about C# or what it is really doing ;)
Oh, I see.
So what part of this exactly is ParseCodeBlock doing?
But, @Mat'sMug, wouldn't that make the code uncompilable?
An undeclared variable, I mean.
lol without Option Explicit VBA does allow that madness....
I see.
Just like how Python programs will run until that line is hit...
So we have a code inspection that detects when a module doesn't specify Option Explicit ;)
So, what exactly is ParseCodeBlock doing?
21:30
@Hosch250 But without Option Explicit, VBA will just keep on chugging.
@RubberDuck Crazy! What value(s) does it use for the undeclared variable?
Everything in the Parser class is aimed at outputting a SyntaxTreeNode that models the code in a project
@Hosch250 a Variant
i.e. a Duck
I don't get it.
21:32
X = 123
X = "456"
Debug.Print X
A Variant can be literally any type
It's sheer madness, but that's what Spolsky needed for VBA to work with Excel.
So what if you called Debug.Print X without any assignment?
It would just print a null (empty) string
Happily
21:34
I was wondering if it just randomly printed a value.
That would be insane, but a null makes some sense.
What does SplitLogicalLines output?
And if you did Debug.Print TypeName(NotDeclaredIdentifier) it would print vbEmpty I think
What type, I mean?
NVM, I can see for mywself.
SplitLogicalLines outputs an IEnumerable<LogicalCodeLine>
So what in the world is a LogicalCodeLine?
A fancy name for a string?
I suppose I can find that in the Grammar class?
This is a logical code line in reality...
27 mins ago, by RubberDuck
aVar = New (param1, _
           param2)
21:38
I mean, how is it stored?
It's a struct I wrote, to hold information like the physical line number, the project and module names, and the actual string content
OK, now I'm getting it.
I found it.
Gotta drop my phone before my wife kills me, ttyl
21:39
See you.
ehh
it looks more complicated than how roslyn categorizes it
or perhaps you could draw inspiration from CodeDom
It looks good to me, now that I am beginning to understand it.
-2
Q: This code needs to be revised

The Code ManIf it is possible can someone please revise my code to see if any improvements can be discovered. This is the code that I want to be revised: <html> <head> <title>Roamfree - Official Website</title> <link rel="stylesheet" href="index.css"> <style> ul { list-style-type: none; m...

22:08
So, if there are any algorithm type people around, I'm interested in hearing what there is to say about my implementation. codereview.stackexchange.com/questions/74702/karate-chop-kata
I know it's VBA, but I'm really more interested in the algorithm.
TTGH home though. See y'all later.
0
Q: Simple PHP Login Register Script with OOP

RajeebTheGreatI am relatively new to programming and OOP in PHP. I tried to create a Simple Login Register Script using my basic knowledge of OOP. I'm sure my code can be better in a lot of way. I'm trying to code better and learn new things. Be harsh, please find out as many small noob mistakes as you can. S...

22:34
@Hosch250 thanks, that's reassuring :)
@Mat'sMug Are you being sarcastic?
I wouldn't be reassured by that, but it does look correct to me.
lol I'm happy that someone else finds it okay!
I want the pizza hat.
I WANT THE PIZZA HAT!
@JeroenVannevel it's just the line continuation that makes it complicated - Roslyn-ish parsing should work if the input factors them out
@MannyMeng best of luck!
22:39
@MannyMeng Post a fairly easy question and link it here.
I wonder if they made the pizza hat so that people would mishear it as "pizza hut" and get hungry for pizza
HTML/CSS/JS is good because there are three languages that apply to a lot of people.
@Gemtastic Now I'm hungry...
@MannyMeng Me too bro
I don't have any HTML code...
for review.
22:42
Write some - it isn't hard.
Give me an idea.
I DEMAND AN IDEA!!!
I wrote a Fibonacci checker.
And I don't want to copy you.
You could check if two numbers are amicable.
amicable?
22:43
Yup.
takes out dictionary
Amicable numbers are two different numbers so related that the sum of the proper divisors of each is equal to the other number. (A proper divisor of a number is a positive factor of that number other than the number itself. For example, the proper divisors of 6 are 1, 2, and 3.) A pair of amicable numbers constitutes an aliquot sequence of period 2. A related concept is that of a perfect number, which is a number that equals the sum of its own proper divisors, in other words a number which forms an aliquot sequence of period 1. Numbers that are members of an aliquot sequence with period greater...
Or you could print the sum of two numbers.
Something easy to start if you don't know them.
Be sure to include the CSS and JS too.
I'm new to HTML/CSS/JS.
Good - you'll make lots of mistakes for me to write answers about.
Use this as a framework:
<!doctype html>
<head>
    <title>Title</title>
</head>
<body>

</body>
0
Q: Troubles in using mysqli_fetch_array()

SachinDeLordI'm trying to get some data from a mysql database. Here's my code: $user_no="94777555444"; // Strings of querries to be executed $query1_string = "CREATE VIEW Leaderboard AS SELECT Name, Points FROM user ORDER BY Points"; $query2_string = "@rank = 0; SELECT @rank := @rank + ...

22:50
@DJanssens: I'm looking at ryanair flights from Budapest to Brussels but I'm getting prices of 60€
On February 6th
oh wait, I think he's actually left today himself
dammit
2 accepted answers now.
0
A: Roamfree official website

Hosch250Your HTML seems to be correct, except you do not have a doctype in there, which goes at the top of the document: Doctype for HTML5: <!doctype html> Your CSS has one error: li { float: center; } center is not a possible value for float - only left and right are. Otherwise, your code ha...

My highest and lowest voted answers.
Thanks for voting.
Good answers deservs upvotes.
Was it good?
23:06
Good enough for an upvote
@JeroenVannevel, you have to be pretty lucky with raynair, some days are like 15 euro, while others can be 100. it seems pretty random.
yeah I noticed
The day I'm going back happens to be 64€
The day before and after 42€
then one more day later 15€
fml
why not stay one more day then? D
@DJanssens cuz it's gonna cost more if he does
When buying plane tickets, visit the site in incognito mode (or your browser's equivalence). The sites track your visits with their cookies and gives you different prices depending on how many times you've visited (usually to the more expensive price)
23:14
Nah, one night in Budapest is 8€ so that's fine
Buapest Hostel was 8€ per night you said
(I just wanted to give a random advice)
it's just that my friend who might be coming with me has his internship one or two days later
@DJanssens holy fuck that's cheap and coming from me that means a lot cuz in my country the currency is quite weird
23:14
=)
and plane tickets around 30€
@Phoenix What country is that?
@JeroenVannevel Bulgaria
I'm staying in a 4 star hotel for 4 nights with breakfast and plane trip = 200€
@JeroenVannevel A lot of people say it is really cheap here. It sure is a first for me to say that another country is cheaper
Ah, Bulgaria and Romania are on my next next trip
23:15
Cool. Bulgaria is also on my todo list :)
haha
Where are you guys from?
I believe I found a roadtrip buddy afterall!
:p
This is my layout for the end of january so far:
Belgium
0
Q: Efficient byte sequence detection

MondainI wonder which code block is more efficient in Java at detecting the byte sequence of 00 00 00 01 and 00 00 01 in a byte array. Version 1 for (int i = 0; i < frame.length - 4; i++) { if (frame[i] == 0) { if (frame[i + 1] == 0) { if (frame[i + 2] == 0) { ...

0
Q: Looking for best practice to handle conditional logic inside controller actions in asp.net mvc

ram sudheerCurrently I am looking for best practice in handling conditions inside the controller actions in asp.net mvc. For example - public ActionResult Edit(int Id = 0) { var Item = _todoListItemsRepository.Find(Id); **if (Item == null) return View("NotFound"); if (!Item.IsAuthorized()) ...

23:17
@JeroenVannevel have you considered euro-rails or whatever it was called
I found the trainrides using raileurope-world.com
is that what you mean?
wow those guys really are dirt cheap if you pick the right day... talking about raynair
haha indeed
eurail is actually more expensive
23:20
Yeah, $13.21 for some flights.
I know who to fly with now!
i found a 90 eur for 3 people from bg to uk
When I do fly, that is.
and it's pretty decent
213€ for 3 countries
i might go somewhere with my family in a few months
23:20
But that's without me getting to Zurich and flying back to Brussels
Keep in mind though that Ryanair is very uncomfortable
it gets even cheaper if you book ahead
They skimp on in-flight stuff like legroom and carry-on sizes and ask lots of money for luggage
Everyone's planning to go abroad and I'm just sitting here coding...
@Gemtastic hehe don't worry
i haven't even been anywhere out of bulgaria yet
I'm just going to make sure I get to the airport really soon so I can get an emergency exit seat during checkin
23:22
@JeroenVannevel why would you want that?
I've been in three states - Minnesota, Wisconsin, and Iowa.
@JeroenVannevel for 5 euro extra you can order a seat in advance
@Phoenix They are extra wide
Because people need to crawl through there when shit's burning
@Phoenix so it's your first? I hope you have fun ^^
So lots of legroom
23:23
@JeroenVannevel ah i see
and if the plane crashes, I'll be the first to survive
another bonus
@Gemtastic Well yea... nothing is planned yet. I am just thinking
@DJanssens I'll probably do that then
Although 5€ is like.. 7 hungarian beers
@Phoenix Ah. Well, dreams are free after all :P
23:23
@Gemtastic For now:D
@JeroenVannevel the site I gave you was wrong
Wait until there is a tax on dreams.
I'm thinking about buying a 22 days pass continuous for 345
and go through europe
@Phoenix Watch your mouth (and keyboard).
23:25
yeah it's confusing, but some RL friends used interrail last summer and had a great experience
This traveling talk makes me think about the programmers that live as globetrotters coding for their living.
hey guys ... wanna hear how many airports my country has? but be careful you might want to sit down... the number is so big that you will need all of your brain to process it so you wont be able to stand?:D
@Hosch250 :D
Sure.
Mine has just as many or more.
23:26
Oh.
Where are you?
is that a lot?
How much do we have @JeroenVannevel, I only know charleroi and brussels
it's an improvement though... umm... a few minutes ago i thought it was 1... that's for knowing my own country... and i have been to all of those cities ... just didnt know there were airports there
and talking about Bulgaria
There's also one in Ostend I think but that's for private planes or something like that
Those two are the only public ones you'll find
440 major airports in the US.
@Hosch250 but that's MURICA
:D
23:28
Not counting the little strips for small jets and planes.
@Hosch250 is a winner! :D
We have like 3 within driving distance.
@Hosch250 so you are from US?
Yup.
@Phoenix I said so above ^^
23:29
My county has random roads that can be used as landing platforms >_>
Cool... I wanna visit... but costs too much... it is infact the only country i'd want to visit if i could
Kinda funny because they're made for times of war.. and I live in sweden...
I've read of people landing in cornfields here.
@Gemtastic is Sweden as costly as Norway
?
@DJanssens Nope
23:31
@Phoenix Just don't visit MN. Go visit Alaska.
I was blown away by the beer prices in Norway, man!
Or the Rockies.
But I wouldn't say we're cheap either
@DJanssens That isn't a problem for me.
@Hosch250 why not?:D
23:31
MN?
Well, up by the border it is pretty, but the cities are ugly.
@DJanssens Minnesota ... SO rule number 1 ... always google first
the circle of beer: Norwegians go to sweden to buy beer, swedes go to denmark, denmark goes to germany...
@Gemtastic not quite a circle now is it
@Phoenix When you've had all that beer it will be
;P
23:33
@Gemtastic :D:D
Programmers are by default lazy ;)
4
at least that's what my Uni professor told me :D
@DJanssens depends hehe... but then again i aint no programmer by profession
The definition of programmer: a machine that converts cigarettes and beer into code
I'm as lazy as intermediate operations in Java8
@Gemtastic care to explain for the foreigners here?:D
We'll see.
23:37
@Phoenix In java 8 stream they have intermediate operations which do absolutely nothing, until you call for them, and they deliver instantly.
I've never had a cigarette or a beer.
@Hosch250 i've had beer but no cigarettes xD
I'm a Java developer that doesn't drink coffee
I've not had a coffee either.
@Hosch250 and you mean you've never ever drank any beer?
23:38
I don't want to - I've read it tastes like the dregs of the bay.
Besides, I couldn't if I wanted to - drinking laws here.
@Hosch250 huh well... i really can't say ... beer in Bulgaria is a lot different than beer in the US
@Hosch250 You mean age?
Yup.
How old are you?
Well... we all know drinking laws are pretty useless... if there's a will there's a way.
Not telling.
I'm in college - that's all.
23:40
@Gemtastic That's true. Especially in my country
But I didn't like beer when I was 13 and I don't like beer now >_>
@Hosch250 I'm in high school... wanna know more ?:D
Don't care.
If you give it, hope one of us isn't a hacker or ID thief.
@Gemtastic Well I think it tastes good... but then again there is big difference between beer and beer
Some, I've heard, tastes like it was already drank.
23:41
@Hosch250 Are you pointing fingers?
@Phoenix I'm not saying you aren't allowed to have it, I'm just saying I don't :P
Just warning - I've written college papers about this, so I know it is very dangerous and not uncommon.
@Hosch250 Hehe ... i'm 15 and I have no fucking idea what I am doing in such a chat.. but it's fun
@Gemtastic I know you aren't and I really drink only on special ocassions
@Phoenix You are too young to be swearing then.
@Jamal
23:42
I have a lot of "beer hipsters" as friends. I know there's beer, and then there's beer!
@Hosch250 I am probably too young to be breathing then aren't I?:D
No.
Michigan used to have a good law about swearing in front of women and children.
@Hosch250 Gasps PHEW
@Hosch250 I better avoid swearing in front of any if I happen to see them in this chat :D
jk xD
I don't really get why it's worse to cuss in front of women
If it's bad it's bad.
Now kids, I get because the adults in their lives will leave an impression in their vocabulary
And if it's good ... then it's also bad :D A warden's logic (sorry just saw a movie)
And what is the difference between a minor and an adult swearing?
I don't think there is much
It is rude wherever it comes from isn't it?
xD
23:47
Minors are still developing their vocabulary
And they don't know what it really means and how bad it is.
@Gemtastic Technically so are adults...
Switzerland's hostels are 3x Vienna or Hungary.. 30€/night are hardly hostel prices
cussing will decrease the size of your vocabulary.
@Phoenix No, not in the same way as minors do.
@Gemtastic Well that is true... wow are you guys seriously lecturing me about swearing?
23:49
Yes.
GG :D
Is that another?
We will stop when you fully understand the implications of swearing and when it is or isn't appropriate. ;P
@Hosch250 I think somebody else needs to develop it's vocabulary a little more :D ...
There are moderators to review swear words from this chat you know.
23:50
@Gemtastic That is very kind of you Mr.
And I know all the ones you've said so far, and I'm not interested in expanding my vocabulary in a way that I will never use.
Well I guess you don't know what GG means because you asked....
I assume you know that there are multiple meanings to that?
Such as Good Game?
@Hosch250 There probably are... like there are multiple meanings to everything
23:52
@Hosch250 Yes. I think this is the exact one I would know since it was the one I was referring to
OK, I wasn't sure if you were referring to a naughty meaning I know of.
@Phoenix how are we supposed to know that with no context? could just as well be Good God
Exactly.
@Gemtastic Sorry, I am used to using it among gamers xD
I knew someone named GG once.
23:54
@Phoenix That's when it's appropriate.
At least, she went by that.
Goddess Gena
Hardly.
0
Q: Minimize Boilerplate Code in Action Class

ohtphBelow is my LoginAction Class: public String execute() throws Exception { // redirect if user is already logged in if(session.containsKey("currentId")) { return "index"; } Integer currentId = mm.getCurrentId(member.getMemberId()); String currentAccessType = mm.getMem...

23:59
RELOAD!
00:00 - 21:0021:00 - 00:00

« first day (604 days earlier)      last day (3710 days later) »