« first day (683 days earlier)      last day (3631 days later) » 

00:00
@SimonAndréForsberg: your sb concat is stinky
Boy, this was a surprising accept:
6
Q: Feed API to display RSS feeds Ted talk

Snehal ShahI am trying to create a webpage that will read RSS feeds from the TED talk website and display it on a page. I am using Google's Feed API for this. Here is the link to view the code online. Could someone please tell me if there is a better way to display the data coming from the feed? HTML <...

No comment for a couple months. Thought the OP had backed out.
@Duga Uh-oh.
@JeroenVannevel whoops. fixed. Still complaints?
mmmm
chars should be length
You're hiding (well, not compiling) the method argument
and its chars name isn't a good fit since it's just about the length
damn, it's difficult to modify existing code without a compiler
or perhaps I am just tired
I wouldn't call it token either since that has a different meaning in IT-related context
but that's minor
00:05
or wanting to get the answer done quickly
oh wait
this is exactly that context
Neeeeeevermind
I suggest CHARS instead of chars.
I suggest chairs.
You know, I put importblogkit.com in chat several times, and I just noticed it never got a star.
I gotta remember to tell people where the edit button is located... Fixed.
@nhgrif How is that even possible?
00:19
@nhgrif Quick question - when I was doing Visual C++, I did some projects with random numbers.
Greetings all.
That's a statement.
Before I realized that I shouldn't seed it each time, I would do something like srand(time(0)).
@nhgrif perhaps it would get some more stars if there were some more content on it
Why shouldn't you seed it each time?
@SimonAndréForsberg Perhaps it would have more content if it got more stars?
00:20
And, when I tried to generate, say 10 numbers in a row, it would return the same number until a new second came.
This post is better suited to the CodeReview Stack Exchange site. — Tenfour04 26 secs ago
It shouldn't be seeded each time because it re-seeds itself each time you call it.
lol... I literally just got this a few hours ago. @Phrancis has been helping me set up the stuff
It doesn't re-seed itself each time.
If you feed it the same value, the algorithm appears to return the same value.
So if you don't seed it, you get different results.
3 hours ago, by nhgrif
I HAVE NO IDEA WHAT I'M DOING
00:21
I don't know of any other use for a random seed than testing. Which is already a questionable approach
The entire purpose of a seed is so the random generator will return a pre-set sequence
@JeroenVannevel Random in C++ requires a seed.
so if you seed it with the same seed, it will give you the same sequence
So best practice is typicially to seed it with whatever clock tick your computer is on.
Exactly.
You don't give it the same seed.
00:22
See, this is why C# is superior to any and all languages now and in the future until death do us part.
Most random number algorithms use a seed at the beginning.
No explicit random seeding.
No, @JeroenVannevel... C# is better because random seeds itself for you.
@JeroenVannevel You typically call srand(time(0)), IIRC.
Here, I'm creating a quick IdeOne example.
But don't be fooled. Any random function on any computer in any programming language requires a seed (almost always grabbed from the current time stamp). Some languages just don't allow you to give a specific seed.
00:24
Asking about why a player randomly gets stuck after a collision is off-topic for Code Review. The rest of the question sounds on-topic for Code Review. You have quite a lot of code here, it would be extra helpful if you could link to a github repository or similar (a way to grab all the code for local testing, if possible) in addition to having the code in the question. — Simon André Forsberg 26 secs ago
So honestly, C++ might be better in that regard. You can give it a specific seed OR you can seed it with the time stamp like C# does.
I don't read non-C# code. It brings me down from my high horse and I quite like it up here
2
	Success	time: 0 memory: 3140 signal:0

1620393037
1515288660
80712527
1097867881
1968774905
352723467
1514090804
563435304
2008408385
927324180
230675279
492618967
258863456
1644979735
421826871
1830464586
2117373936
1445353813
937350198
1451715608

Success	time: 0 memory: 3140 signal:0

934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
934329062
@JeroenVannevel you just read my Java code.
@nhgrif C# allows both: explicit and implicit seed. Although I believe the seed is more than just a timestamp
00:26
So, there it is being seeded each time and not being seeded each time.
C# is probably like Java, where it doesn't allow the same seed to happened twice.
@SimonAndréForsberg No, my brain created an AST from the Java code and generated it into C# for me. No Java was read!
But, it is probably based on the time stamp.
@Hosch250 Can you just post the source code?
Either Java or C# use the same seed when you create multiple Random() instances in a row. I'm thinking it's C# but I'm not entirely sure.
#include <iostream>
#include <ctime>
using namespace std;

int main() {
	// your code goes here

	srand(time(0));
	for (int i = 0; i < 20; i++)
	{
		cout << rand() << endl;
	}
	return 0;
}
Move the srand() call inside the loop for the second version.
00:27
That's the first example returning different number each time?
Yep.
Anyway, my question was if that was possibly why this code was returning patterns:
What does time(0) return? I'm not sure whether time(0) is right.
5
Q: Random 5-character token generator

ScottI have an Android app that uses randomly generated tokens to log in. They're 5 characters long, are sent to a user's email address, and have a short lifespan, so I don't think I need anything that's extremely secure. I'm getting odd result that suggest I'm not really generating random numbers. ...

void Main()
{
	for(int i = 0; i < 10; i++)
	{
		new Random().Next().Dump();
	}
}
00:28
time(0) returns the current time, I believe.
Same output 10 times (C#)
Java doesn't have this issue
Time in seconds from 1970, or something like that.
@Hosch250 unix time / epoch time
I know, but he keeps reseeding it, and Java will prevent the seed from being the same.
It returns time in seconds?
00:29
@Phrancis Euuuh my brother used my account?
Yes, seconds from 1970, I believe. @JeroenVannevel called it unix time.
You're going to burn through the loop of 20 in WAY less than one second.
@JeroenVannevel I used to believe that Java did that, but at least in Java 6 and onwards, it doesn't.
@Hosch250 ***`using namespace std
@SimonAndréForsberg Yeah, I recall it being either Java or C# and I just verified it's C#
00:30
@Duga That was put in there by Ideone.
struct timeval time;
gettimeofday(&time,NULL);

srand((time.tv_sec * 1000) + (time.tv_usec / 1000));
Bjarne Stroustrup just taught me srand(time(0)).
@Hosch250 using namespace std detected
Yes, srand(time(NULL)); is fine if you're only seeding once.
@Duga Don't blame me, blame Ideone.
That is what I did to solve the problem.
00:32
If you seed more than once per second, you should use the code snippet I just pasted.
@JeroenVannevel yay! Java - C# 1 - 0
Because if you seed more than once per second, time(NULL) returns the same number for an entire second at a time.
@SimonAndréForsberg Random() and enums, that's all you've got. ALL YOU'VE GOT!
@JeroenVannevel Don't feel bad about it, my brother used my account to post MySQL answers too... ;D
@Hosch250 Duga blames no one!
00:32
Yes.
And it takes way less than a second to get all the way through 20 iterations.
@JeroenVannevel good enough for me ;)
Community rep?
Swift: Eleventy-Billion. All-Those-Poser-Languages: 0.
Who's doing the rand() stuff, and do they have access to C++11?
00:33
@Corbin Just discussing it.
I am using Visual C++.
Ah, alright. Has it been mentioned yet that rand() is crap?
Well, Knuth discussed that it is only pseudorandom.
It seems to work fine when you only seed it once.
Every random algorithm is pseudorandom
Obviously.
It really depends on what you're using it for
but if you actually need random numbers and it's not a class assignment or toy, rand is almost always the wrong solution
00:35
Even a human doesn't generate numbers randomly.
it's range can be tiny, it's period can be tiny... it's just flawed
it's not guaranteed to be thread safe
Well, I use C# now, so it isn't such a problem.
it's pretty much inferior to the facilities of C++11's new random header in every way :/
The only random things are cosmic rays and a woman's sentiment towards you
2
"Random" seems to be a pretty abstract concept, really... Is true random even a testable concept?
00:36
#oldmanwisdom #movietime
This question was discussing random and patterns appearing too often:
@Corbin that's true. I remember when a friend learned C++ that it only went from 0 to 32767 for him. Utterly c r a p.
5
Q: Random 5-character token generator

ScottI have an Android app that uses randomly generated tokens to log in. They're 5 characters long, are sent to a user's email address, and have a short lifespan, so I don't think I need anything that's extremely secure. I'm getting odd result that suggest I'm not really generating random numbers. ...

@SimonAndréForsberg rand() is from a different era when 32767 was considered big :(
So, I just was wondering if it was because he kept generating a new Random object with probably similar keys based on the time.
00:37
@Corbin those were days!
@SimonAndréForsberg I would actually put that CHARS inside the method
(and this is one thing I don't like about C++, so many different standards and so many obsolete things within the core classes...)
it has no business being outside
@JeroenVannevel I'm still voting for putting the chairs around the table.
@JeroenVannevel it has no business being inside either IMO.
00:39
Yeah, it's really unfortunate how much historical baggage C++ has. It feels like a major part of learning it is learning what parts are absolutely terrible and/or outdated :/
@SimonAndréForsberg It's used inside of it and only inside of it. Why can't it be there?
Objective-C is just as old as C++. ;)
@JeroenVannevel sure it can. I just said that constants are more often declared as static final fields. I believe it makes easier modification possible. You can look at the top of your class (where constants are normally declared) instead of finding the right method and change it there.
Mmmmhmmmmmhmhmhmhmhm depends on how you view it then I suppose
	Success	time: 0.07 memory: 380160 signal:0

EnkpgF7tgM
Mi!$yzd8WY
o4N4u4qX5z
6CjsDVFu57
qzHtPmP76H
9UXsyGQx2H
fNyPE4pjRV
JsT$WVV#oT
b#tc5Mx$#$
T98MDK!DQr

Success	time: 0.06 memory: 380224 signal:0

vBOg$NJ2wW
BGu$$8Stnx
GZRFVqGXkT
6HZCZjBmut
kujDQrK82h
3x0ES0siPm
0obfkK4!ZR
RgN#ZX8FB@
u!qd73dFhw
ta@vERe3Fr
It doesn't appear to have patterns.
00:41
I personally like to see things that belong together, in the same context
when I'm working on that method I want it right there to see, not having to scroll up
ObjC did a better job of differentiating itself from C than C++ has done (pretty much because C++ never aimed to do so). Most of the outdated horrible crap in C++ is actually horrible outdated crap in C that leaks into C++ :/
@Hosch250 That statement is as statistically valid as me saying that Belgium consists solely of hotties because I can only see myself in the mirror right now
5
@Corbin I'm surprised Java is as good as it is (or at least as how good I think it is) considering that it's always strives to be backwards compatible. Or perhaps it's just the fact that I know what classes to avoid.
@JeroenVannevel You say code potato I code potato.
@JeroenVannevel I never said it statistically didn't have patterns.
00:43
It used to be so easy to copy music files from iTunes to an iPhone. Why, Apple, why??
Uh, it still is?
I'm out, I've got movies to watch and classes to skip in the morning
'night
@SimonAndréForsberg Java certainly has its missteps. They just don't crash your code or stab you in the throat :/.
it also helps that java is a managed language
one of the major pitfalls of C++ is not realizing how to properly manage resources
and trying to do it like it's 1985
00:45
@Phrancis Get to this screen, checkmark what you want on your phone, click Sync.
C++ is a bit like PHP in that it can be a beautiful, productive, safe language, but the path of least resistance is one full of shitty code, bugs, and sad, sad nights.
2
@nhgrif Well, drag & drop sure doesn't seem to work any more... Trying to take files from a playlist and move into Music on iPhone 4
I'll try that, but it says it will delete the files on my phone if I sync
Are you trying to get from iTunes to phone or phone to iTunes?
Do you have music on your phone that's not in your iTunes library?
Um... actually probably not
So, the music that's being "deleted" off your phone is stuff that's not checkmarked.
00:48
I have plenty in my iTunes library I don't want on my phone (uncompressed PCM audio, 10000 pictures from my wife's camera, etc.)
Because "sync" makes your phone match exactly what you have checkmarked on this screen.
Ah ok
In that screenshot, for example, I have 4 playlists checkmarked.
Anything not in those 4 playlists is deleted off my phone, and those 4 playlists are added.
So... it's actually much easier to manage. ;)
As soon as you plug your phone in, iTunes sees what's on there and puts a checkmark next to it. Uncheck to delete, or add a check to something to add.
And if you've made any changes, a "revert" button shows up next to "sync"
Also, the bars at the bottom will adjust to show you how much space you're using or have available.
OK that seems it should work good, thanks
AND... at the top there's a checkbox to "Automatically fill free space with songs" so you can have iTunes randomly fill up ALL of your free space with music after it's put what you've explicitly selected on there. (I never use this, but seems like a cool option if you've got an iPod)
00:51
Except it looks like it'll take an hour to sync initially lol :D
The problem comes when you're trying to use your phone with multiple computers and those computers don't all have the same music
More like 5 mins really, looked slower at first
None of my music is purchased through iTunes. It's only on my computer.
^Same
If I went to work and tried adding a song through iTunes at work, it'd remove all of my other music.
Because it can't sync that other music with my work computer.
00:52
Most of it are CDs I bought or music I'm working on
And I can't pull the music off of my phone onto a computer.
Ah yes I can see that
Sounds a lot like VB6 @Corbin...
Why would they choose to delete something just because they can't sync it?
That sounds crazy, unless there is a good reason I'm missing.
Someone please do me a quick favor and take a screenshot of my site, to make sure I'm not insane: psychoproductions.net
@mjolka Perfect, thanks!
np :)
Looks good on IceDragon, which as you probably know by know uses FF's rendering engine.
Thanks for the blows.
@importBlogKit
0 tweets, 0 followers, following 0 users
Maybe I'm crazy, but I actually think "import BlogKit" is a quite good name, and I'm surprised it's available both as a .com and Twitter handle...
This'll one-box better now:
@importBlogKit
0 tweets, 0 followers, following 0 users
01:29
@importBlogKit Congrats on your website! #newproduct #objective-c #swiftlang
Seems like the hyphen breaks the hashtag
@Phrancis Now, in my Twitter, would it be appropriate for me to tag @msonenote?
Or, should I just use the #OneNote hashtag?
@msonenote is likely a person. I think #msonenote would be better
Or that
@msonenote is the official OneNote twitter site.
No. It is the official OneNote twitter site person.
01:33
@ tags are used for users, # tags for topics
OK. It isn't as successful as I thought it might be, but I'm going to put the link in my app.
Just like SE... Kinda.
@ is for user
Should I change my SE network name to importBlogKit too?
@TomekObirek Tomek, we wanted to check in. How are you getting along with OneNote? Have you learned any helpful tricks?
01:36
@Mat'sMug TODO: Upload an avatar image to your Twitter
I should respond to that, or would that be strange?
You should if you craft the wording nicely
@Phrancis #ios #osx #hashtag
#ihatetwitter
@TomekObirek Need help with #OneNote? #LearnOneNote to the rescue! #WindowsStore & @WindowsPhone OneNote tutorial, OneNote 2013 tutorials in the pipeline!
Too brash?
01:39
Be careful with the @ here...
Don't worry, no one came up.
It didn't ping anyone as I'm not a mod.
@Hosch250 Maybe something shorter like: @helloUser this app may help you learn #OneNote: #LearnOneNote
01:42
@nhgrif If I have the power to ping someone, their name appears in the ping jumplist thing.
I got Twitter things on my blog now. Yay.
@nhgrif Looking good so far... Just for testing, maybe try putting a really big code block in and see how it looks?
Should I tag both MSOneNote and TomekObirek?
Or just one?
Just TomekObirek
01:44
(I think, I'm not a Twitter pro)
@Phrancis Do you have a plugin for automatically creating Twitter posts when you post a blog post?
I think @foo tags notify the user, while #foo appear in the #foo channel
Correct.
@nhgrif That, I don't ... Sorry
No doubt someone has made something along those lines, not sure what it would be called though
@nhgrif Sure there is.
01:46
It's called WP to Twitter.
Publicizer.
Directly part of WP.
I had it set up for a while, but removed it when I switched my twitter to LearnOneNote from Hosch250.
@Phrancis, I got this to work:
> Hi, @TomekObirek! #LearnOneNote may help you learn lots of tips/tricks! Features #OneNote for Windows Store/Phone, OneNote 2013 coming.
Lengthwise, I mean.
@Hosch250 That reads really good
OK.
I wanted them to know that it didn't have OneNote 2013 (or any other desktop version) yet.
Conveys the message quite well
Thanks for helping me.
01:49
NP
So...
I've had my phone number for a long time.
Ugh, I'm being "challenged" on Facebook. I should delete my account, practically never check it
"challenged" how?
At some point in time, I probably created a Twitter account and set it up with my phone number.
Which means now I can't add my phone number to my current Twitter account...
Because it's already in use...
Can you reset the old account?
01:52
I don't know anything about the old account other than the phone number.
Hmm, ouch.
@Hosch250 Something stupid, as is usual on Facebook
I'm not on FB.
Not missing much
My sisters are, and I think it is dumb.
01:54
0
Q: Brainfuck on-the-fly interpreter in C++

Emilio CobosI was bored yesterday morning, so I wrote a brainfuck interpreter. I know there are a lot, but this one is different. Why? Because it evaluates brainfuck code on the fly, reading from the input file, and eliminates code once it's not reachable anymore, instead of reading the whole program, analy...

Right now, one of them is in a bit of trouble for being extremely silly - stupid-silly - on the chat.
> To remove your mobile number via SMS:

Using the phone you want to remove from your Twitter account, send a text message containing only the word STOP to your country's Twitter short code).
Your mobile number will be removed from your Twitter account immediately. To add a new mobile number via SMS, follow the instructions listed here.
That sounds like the best bet, if you have a mobile number.
Yep, thanks.
the shortcode for US is 40404
Good find @Hosch250
01:58
@Phrancis You're the one who found it.
Right at the bottom of that page.
Oh. Good find @Phrancis!
When will the site go back to normal?
About 1.5 full pages of unedited text, 1 page of unfleshed-out quotes, and .5 pages of outline in my paper.
More later, dishes time.
@Legato This is the new "normal."
NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
Lame. I liked the blue.
@Legato The blue is still there...?
(the Beta blue is, for sure)
02:01
@Phrancis There is a lot of orange now too.
I liked the old way better.
^
Like for highlighted tags.
Sadness overwhelming.
And, everything is squared up now, used to be more round.
02:02
Aye.
@Phrancis Do you not have two monitors, or what?
Oh, well. We'll get used to it. I already am.
I've already accepted it, though I'll never like it.
@nhgrif I'm on a MacBook (except at work, single-monitor W7 machine)
And the very day we say to ourselves "you know, I like it better this way after all", SE will change it back.
02:04
^ Of course.
I don't see how that's relevant.
What's the resolution of MacBook though?
What are all these post-its doing?
Shouldn't they be using OneNote or Project or something?
Checking. Not sure why it matters though, someone else complained about the layout
See you, dishes time.
@Hosch250 The post-its are bugs or features or tasks that programmers need to work on.
02:06
They just grab one, work on it, rinse repeat
You take a post-it off the "No Work Started" and stick it at your desk "Work In Progress" and then you move it from your desk to the "Ready for Test" area.
OR ... the software you develop is an ERP system, and you've got an entire project planning module that can totally perfectly manage this for you without post-it notes...
Post its are OP though.
Isn't it satisfying to have that covered wall systematically diminished until it is eliminated(if that ever really happens)?
We regularly use whiteboards at work though.
@nhgrif ^
Filled up one large one and on half-size one today doing tables.
02:09
I'd like whiteboards more if my hand writing wasn't atrocious.
So true
Looks like my MacBook is running on 1280*800 display
Oh wow.
It's pretty old then, eh?
6-7 years maybe? Not sure
Still works like a charm
So, now I've got a "Tweet" button at the bottom of every blog post, a "Follow" button in the sidebar, and my account should auto-tweet every time I make a new post.
Not bad at all for one evening's work :D
02:12
I bought the domain about 4-5 hours ago.
My first post will be an extension of the To comment or not to comment section of this answer:
12
A: Returning an amount

nhgrifI'm not a C# expert, but I can't imagine unnecessarily creating an array just to use .Contains is very efficient... nor can I imagining even using .Contains is particularly efficient. I can't imagine anyway in which bitwise operations would be useful here given the current values. To comment,...

Well, not an extension so much as a rewrite and some examples of self-documenting code.
Wait... how do I get @Duga to post a message in here everytime a new post is made to importblogkit.com ?
@nhgrif You talk to Simon
I also want to do some static pages at some point... but I want to get at least one legit blog entry in there first so I can feel all right putting a link to the website in my SE profile, etc. (hmm... this seems absolutely stellar to put on a resume actually...)
Anyway, going up stairs to bed.
Thanks for all the help @Phrancis.
Good night @nhgrif
You too @Phrancis I'm off.
Night @nhgrif
Night @Legato
The upvote/downvote buttons changed style. Nifty. I like it!
I did get excited for a second though and think the site had become a non-beta site :(.
02:45
Oct 21 '14 at 14:45, by Malachi
65
Q: Code Review SE is graduating!

PopsMany of you have already seen announcements both on main and on meta announcing this site's graduation. At the request of a few of you who were skeptical (or perhaps merely in shocked disbelief), I'm here to confirm that yes, the Community Team has indeed decided that Code Review should graduate....

@Corbin 169 days since graduation was announced :(
Yeah, I keep waiting for a real site :(
Only a matter of time... CR graduated will be glorious!
@Phrance which do you think will come first: The Winds of Winter, Half-Life 3, or CR's Graduation?
@mjolka Reasonably... I think it's going to be CR's Graduation, though Winds of Winter may come first. HL3... no damn way.
03:21
did colors change ?
Yes.
Let's see, you are probably close to number 20 to ask that.
@Mat'sMug Still having a problem with Rubberduck?
I wonder if it could be that it isn't registering itself in the registry as a 64-bit application, but only as a 32-bit application?
And HELP, they are about to remove the tab that helps us kill zombies!
179
Q: Let’s improve our site navigation

SklivvzA.k.a. the 2015 Questions to Answer Refactoring Konversion (QuARK) A.k.a. the great cheese move of 2015. TL:DR; we are looking to change the navigation of the question lists on the site. We are not looking to remove any functionality or break any existing link. This is not final. We’re taking...

They are trying to kill the Unanswered tab!
Oh, if you go to "needs answer", you can choose "no answer".
Isn't this what codereview.stackexchange is for? — AShelly 8 secs ago
This question appears to be off-topic because it is asking for a code review. See What topics can I ask about here in the Help Center. Perhaps Code Review Stack Exchange would be a better place to ask. — jww 51 secs ago
@jww Code Review would indeed be a better place to ask - but please note being on-topic elsewhere doesn't make a question off-topic here. — Mat's Mug 55 secs ago
03:52

 Rubberduck Support

Help using Rubberduck open-source VBA add-in
04:28
Just reading this:
11
Q: When is it a good idea to force garbage collection?

OmegaSo I was reading a question about forcing the C# garbage collector to run: http://stackoverflow.com/q/4257372/555690. Almost every single answer is the same: you can do it, but you shouldn't - except for some very rare cases. Sadly, nobody there elaborates on what are such cases. Can you tell m...

Makes a question for me to research.
When you call GC.Dispose(), or whatever the call is, does it run across all levels, 0, 1, and 2?
> The only advice on collection I can give is: Never do it.
but it's a good question. I don't know.
I'm not planning on it, but it makes me curious.
I actually studied related material last fall, and it was intriguing.
It was OS Design Principles, or something, and we studied memory, threading, process blocks, and a few other things.
The teacher was most unorganized, so we didn't do nearly what was planned.
Also, the quizzes were terrible, so he had to keep re-administering them.
Like, we would study threading, and he would post a memory quiz, which we weren't going to study for another two weeks.
@Hosch250 read the docs :P
@mjolka Later, almost bed time.
04:50
TTGTB here
'night CRitters!
05:30
@mjolka we could claim this on tax couldn't we?
@Hosch250 read it as a bedtime story buddy
@Mehrad yep, i believe so :)
actually, that's a pretty good incentive to buy a license for linqpad
06:06
@agf would it be ok to put the code on codeReview, as those are dummy data i have put them on github too, should i remove them. would their be an issue! — Sandeep kumar H R 14 secs ago
@mjolka that too. Now you're talkin
 
1 hour later…
07:08
This question may better fit in Code Review SE. — Wojciech Frącz 5 secs ago

« first day (683 days earlier)      last day (3631 days later) »