« first day (1818 days earlier)      last day (3041 days later) » 

3:00 PM
Learning by googling.
 
> If I want to do something in code and lack the knowledge for it, I just look it up :)
4
ftfy
 
Haha right!
 
Yea, pretty much.
The best piece of advice I ever got was that it's far better to know how to find answers than just having answers.
 
I think it is still "better" if you already know the answer, but as a skill searching/finding stuff quickly is really valuable=)
 
Without a doubt. Having search skills is really essential, especially as more and more things become digitized.
 
3:06 PM
I just wish my house was easily searchable. I've yet to find a good data structure for physical things that I can easily search. For instance, I have no idea where my Rubik's cube is, despite looking for it for a while last night.
 
Internet of Things ... it's coming
 
My Rubik's cube has been mostly neglected ever since I started shuffling Magic cards instead
 
RFID (and other technologies) providing location data, digital sensors tracking object movement through the house
"House, where are my keys?" "They're located in the top drawer of the nightstand in the master bedroom."
 
@Rainbolt ♪ Every day I'm shuffling.... >_>
 
Where is my internet? Where is my power socket?
 
3:10 PM
That might help for "important" things, but I can't see everything I might need being digitized. Some things will undoubtedly still be unconnected.
 
for example: "House where's that marble I just lost"?
are you really going to put an RFID in every marble?
 
"House, where is the search function?"
 
A kitchen inventory system would be great, though, and I'm sure that's coming relatively soon (compared to whole-house).
 
@Geobits to an extent. I couldn't see them being put on clear glasses, for example
"Mom, what's this line on my glass"?
 
I think for many things there is just too little advantage to gain.
 
3:12 PM
@NathanMerrill I meant more like groceries, etc. So while at the store you could ask your fridge how much milk you have left. Things like that.
 
@Geobits that's significantly harder than an RFID chip
 
Sure, but I don't doubt it's coming.
 
are you going to put a scale underneath your milk carton?
 
Baby steps. First steps are "do I have any milk in the fridge?"
 
No, but a poop analyzer that can tell the house how much milk you consumed.
 
3:14 PM
@Geobits who starts the progress? the fridge or the milk?
 
I think there are already RFID-enabled fridges, but IIRC they're crazy-expensive and error-prone right now.
 
people don't buy fridges very often, so selling more expensive milk to make it work isn't feasible
it feels very similar to the Oculus Rift: Its expensive (and desired), but for a large adoption, there needs to be a large amount of games for it. For a large amount of games, there needs to be a large adoption
 
Yea. Hopefully it doesn't go Vita.
I love my Vita, and the hardware is amazing. But damn it sucks having no (good) games. It's mostly useful playing PS1 classics nowadays.
 
I wish I had a Vita so that I could play Harvest Moon: Hero of Leaf Valley
Not really worth $150 for one game though
 
3:30 PM
Ohmygosh. Square Enix is going to pay for stealing my $20.
 
You know what I'm much more excited for? Smart showers
 
I'm not sure how smart a shower needs to be. Elaborate?
 
all it needs to do is track my ideal temperature
the temperature changes with the outside temperature, time of day, and duration of the shower
 
Every minute, turn the handle 5 millimeters counter-clockwise. That'd be good enough for me.
 
exactly :)
but all I need to do is press a button, and the perfect temperature comes out
and stays perfect
 
3:33 PM
So, just a thermostat connected to the mixer? Sounds easy enough :P
 
Until you run out of hot water
 
@Geobits yeah, very similar to house thermostats
 
@Rainbolt Hook it up to the water heater and give a two-minute warning beep.
 
oh, and person identification
that's more difficult
especially because we don't want any cameras to be looking around :)
 
Bill Gates's family all wear these chips and when they walk into a room, the temperature, light, and music adjust appropriately. Should be easy to waterproof.
 
3:35 PM
No need for automated identification. Just set a profile for each person and select when turning it on.
 
@Geobits that's too much work
the chips isn't a bad idea, but is susceptible to the same problem with the smart fridge
 
Not if it stays on the last setting unless changed. My kid and I, for instance, usually use different showers. It would be rare I'd have to touch it.
 
right, but most couples share a shower, as well as siblings sharing a shower
a scale could certainly help
 
You could even make it a dial to get the shower-knob nostalgia thing. Set dial to Jeff, press on :P
 
lol
"Get your custom built shower now! Includes faces of all of your family members!"
 
3:40 PM
Nothing like having your family's faces in the shower with you, amirite?
 
I really am lol
 
@AlexA. Didn't see it until just now, but I'm not sure you can imagine how happy I am about this.
 
I'm not a code-golfer (if that isn't obvious by now). I've heard the argument that golfing your language of choice makes you a better programmer in that language (as you know the inner workings better).
However, is there an argument that golfing in a golf-specific language makes you a better programmer?
I mean, if you don't understand stack based languages, there's definitely improvement there.
 
I think golfing languages typically expose you to new ways of thinking that your average programmer doesn't see much.
 
You are @Geobits and you approve of this policy?
 
3:46 PM
I heartily approve :D
 
@Geobits could you provide an example?
 
@NathanMerrill I was going to use the stack-based example, but you beat me to it.
 
:P
right, and that's the big obvious one
 
@NathanMerrill If by better you mean more likely to do things in insane ways, sure.
 
I think it mainly depends on what your current knowledge level is.
 
3:49 PM
@Dennis while I wouldn't actually do a lot of the things people do to golf, its important to understand what the compiler is actually doing
for example, this tip
it explains the differences between classes and interfaces
 
But I'm not sure it's the fact that they're "golfing" languages. More that they're not the standard industry used/taught stuff, so you broaden your knowledge in general (if you didn't already have it).
You could learn as much by using a verbose language with same paradigm, I'd guess.
 
right, like PostScript
which is still being used (assuming you're in the printer industry)
 
I find that golfing in PowerShell stretches my brain to think in terms of different algorithms to accomplish a given task, rather than strictly "how to golf XYZ function"
 
oooh, that is a good argument
no matter the language, being able to consider different algorithms is a critical skill
 
For a simplistic example, iterating over an array ... the "traditional" approach is to for($j=0;$j-lt$arr.Length;$j++){blah}
instead, because PowerShell works on objects, and the pipeline passes objects, using a "golfing" technique stretches my brain to actually leverage a feature of the language
$arr|%{blah}
Instead of iterating over the index, iterate over the actual array objects themselves
 
3:55 PM
@NathanMerrill OK, but merely reading that tip gives you the knowledge.
 
have you ever tried to read the docs to learn a language?
sure, all of the knowledge is there, but writing code is a significantly better way to learn
 
I learned Java by reading a 350 page book
It was my very first language though
 
@NathanMerrill That's not at all specific to golfing though. And the interface thing isn't something you could discover yourself; you have to have read it somewhere first.
 
While that tip is great for golfing, I don't think it really teaches anything for non-golfing use. You're not just going to change a class to an interface without having a good reason to.
 
@NathanMerrill Yes, I learned Perl and JavaScript with a printed tutorial. That was a long time ago.
@NathanMerrill Another example are languages of the APL family (J, K, Q, Jelly), in which you have to convert problems into a series of array manipulations to get a competitive approach.
 
3:58 PM
@Geobits but you might write an interface and include the "public" modifier
 
Sure, but that wouldn't cause any problems.
 
right, but its bad style
 
Explicitly stating the modifiers is considered good practice by some anyway.
 
Off-topic: I didn't realize APL had its own dedicated Unicode symbols
 
Yes, APL's symbols predate Unicode by several decades.
 
4:00 PM
There's a strawpoll for redundant modifers here: stackoverflow.com/q/254912/3224483
 
Of course, any decent workplace/org has a consistent style guide (or fucking should), so it only really matters in private code.
 
Our style guide is "follow the freaking universal style guide"
It works well for HTML, C#, and JavaScript. It doesn't work well for SQL and PowerShell
 
@Rainbolt "Universal style guide" and "PowerShell" don't belong in the same sentence together ...
 
I'm a bit of a style rebel for SQL. Caps everywhere makes me queasy.
 
@TimmyD I didn't put them in the same sentence
 
4:05 PM
@Rainbolt I was agreeing with you
 
You agree that I didn't put them in the same sentence?
 
That too.
 
<pedant>The pronoun 'it' could be a standin for 'the universal style guide' in that sentence.</pedant>
 
I rejected a code review the other day because someone aliased a table with "mtr" and another one with "a". He resubmitted it to another developer who happens to be my team lead. The response he got was "Never use one letter aliases again ever."
 
About the closest that PowerShell has to a "universal style guide" is the admonition to use a verb from the approved list...
 
4:06 PM
Upper and lower case are not enough. We also need a middle case.
 
I had to avoid that guy for like a week because it was embarassing
 
@flawr sᴍᴀʟʟᴄᴀᴘs?
 
Smallcaps should be reserved for filling in forms by hand.
Other uses are obnoxious :P
 
@TimmyD middlecaps
 
we can't do middle case
think about camelcase
 
4:09 PM
Yes we can!
 
the first letter is middle case
 
Z҉A҉L҉G҉O̚̕̚ ?
 
every additional word starts with upper case
and the last word ends with middle case
?
 
@Geobits Small caps are obnoxious, cause font weirdness, and mostly show up as little boxes on my phone.
 
That is why we need middlecaps.
 
4:10 PM
all of our capitalizing conventions are going to explode
 
user image
3
 
Can I have one of those small caps? :)
 
Upper case letters are called capitals in english, is there another word for lower case letters too?
 
I'm just seeing the 'your font sucks' box on top of his head. What's supposed to be there?
 
@flawr miniscules?
 
4:12 PM
@flawr Small or little. As in "Capital N, small e,r,d".
 
the opposite of capital is poverty
poverty letters
 
That's why we need middlecase. To shrink the gap between capital and poverty.
 
we all know that middlecase can't exist
anybody who thinks that they are middlecase is lying to themselves
 
You could implement it, but over time they'll just drift one way or the other (usually to lower), and there will again be no middle.
 
TIL -- "Upper" or "Lower" case letters originally referred to literal boxes of type blocks that were higher or lower when gathering blocks for old-fashioned typesetting with a printing press ...
In orthography and typography, letter case (or just case) is the distinction between the letters that are in larger upper case (also capital letters, capitals, caps, large letters, or more formally majuscule (see Terminology) and smaller lower case (also small letters, or more formally minuscule, see Terminology) in the written representation of certain languages. Here is a comparison of the upper and lower case versions of each letter included in the English alphabet (the exact representation will vary according to the font used): Typographically, the basic difference between the majuscules and...
 
4:20 PM
if things were a bit different, then we could have had "left case" and "right case" letters
which would spark all sorts of questions like "why are left case letters still hard to write for left handers"?
 
@NathanMerrill That's what writing systems like Arabic have
 
arabic is just left-to-right
 
Left, middle, right, and stand-alone
 
AFAIK
oh they have different reading directions?
 
I think that's how it works, I may be wrong
 
4:22 PM
also, why would you put "upper case" letters in the upper (more accessible) case when you use them less often?
 
@NathanMerrill No, like right is on the right side of words, left at the left, etc.
 
oh really?
huh, no idea
oh nevermind
 
Final, Medial, Initial, and Isolated
 
just looked at a picture, upper case is less accessible
 
0
A: Sandbox for Proposed Challenges

user1657355You'll Huffman you'll puff and you'll code the house down code-golf Huffman coding is a way to compress data based on the frequencies of characters used in it. This can be done using either probabilities or actual frequencies in the data. An optimal Huffman code for a string S is a mapping from...

 
4:23 PM
The Arabic alphabet (Arabic: الأَبْجَدِيَّة العَرَبِيَّة‎ al-abjadīyah al-ʻarabīyah or الحُرُوف العَرَبِيَّة al-ḥurūf al-ʻarabīyah) or Arabic abjad is the Arabic script as it is codified for writing the Arabic language. It is written from right to left, in a cursive style, and includes 28 letters. Because letters usually stand for consonants, it is classified as an abjad. == Consonants == The basic Arabic alphabet contains 28 letters. Adaptations of the Arabic script for other languages added and removed some letters, as for Kurdish, Ottoman, Sindhi, Urdu, Malay, Pashto, and Arabi Malayalam, all...
@NathanMerrill ^ Take a look at the right side of the table
 
So here's an idea that I've got that I'd like some feedback on before elaborating it into the sandbox.
 
@Doorknob I've been thinking about our conversation yesterday, which spawned another today. In case you are interested
 
In the C-style commenting system, you can create a block of code which will not execute based on the insertion of and removal of a character. It looks like:

//*
stuff_that_executes();
// */

and the first character needs to be deleted to make it not execute or inserted to make it execute again.
 
Oh hey, I'm currently at #6 in rep gained this year :)
 
@MartinBüttner When will we finally get to vote on the Best of PPCG 2015?
 
4:30 PM
@CRDrost I'm not sure I understand. If I delete the first star, the function will be called
 
@NathanMerrill Not the first star, the first slash.
changes it from two single-line comments into one multiline comment.
 
oh, so the first character determines whether the entire program gets executed
 
@NathanMerrill Thanks, that'll be good reading material for this afternoon
 
yw :)
 
In Haskell you can actually do this with the normal constructs because the language is lazy; (if 10 > 9 then ____ else ____), delete the 0 to get the alternate code path. I'd like to see what other languages have such that with valid syntax there are two codepaths, and you can toggle between them by inserting or deleting a specific character.
 
4:32 PM
@CRDrost New challenge idea: create a block of code which will not execute based on the existence of one single character.
 
I'd say that the majority of languages have that feature
 
Your post is a good start.
 
So I'd be interested in a sort of programming puzzle that just collects answers for different languages of how to do such things with one-byte deletion/insertion.
 
in fact, if you make your ___ else ____ statement a function call
then every language is included
 
Also, I'm interested if we can extend the C example to be two paths that are toggled, not just one path that's executed or no.
 
4:33 PM
(assuming it has functions)
 
The thing is, it's code golf! You need to make the block delimiters as short as possible!
 
Yeah I guess with JS you can also do ((10 > 9) ? (() => { ____ }) : (() => { ____}))() to do the same.
With C I'm not sure how I'd do that, though. Hm.
 
well, technically, any "if" statement has that feature
 
Oh, right.
Hm.
 
we don't execute the statements in the braces unless the condition is true
 
4:36 PM
You can do it in PowerShell --
#<#
stuff_that_executes()
#>
Removing the first `#` will turn it into a multiline comment, otherwise it's two single-line comments.
 
So, should I submit it as code golf with block delimiter length being what's counted?
 
Random question: Are downvotes applied before or after the rep cap?
I think it's before, just making sure
 
Or as some sort of open-ended thing where I just won't choose a final answer?
 
@ETHproductions Votes modify rep in the order they were cast in.
 
I'm not sure if it works as a challenge
 
4:38 PM
I'm not sure it would make an interesting challenge...
 
@CRDrost I believe it needs some objective winning criterion.
 
ninja'd :P
 
@CRDrost Challenges without an objective winning criterion are off topic.
 
I'm at least finding it challenging due to trying to find a way to make C-style comments toggle between two codepaths.
 
@Dennis So if, say, you "earned" 250 off of upvotes, then had a downvote, you would earn 200 rep and not 198, right?
Or would the 200 cap off your earnings as you earn past it, and then you lose the 2 rep with the downvote and earn 198?
 
4:41 PM
@ETHproductions No, upvotes cast after you hit the rep cap do not modify your rep. 20 upvotes -> 200, 5 more upvotes -> 200, downvote -> 198
 
@AlexA. Since users have more eyes than mods, is it OK for us to flag "why the downvote?" comments for mod attention?
 
oooh, what about a "what's the shortest prefix that prevents any code from executing"
 
@Dennis Oooooooohhhhh, that makes sense. And it makes the challenge I'm about to sandbox more challenging. Thanks :)
 
not sure if that's possible in every language
 
aha, you insert a /*/in the middle. Well, if you guys don't think it'll be interesting then I won't bother.
 
4:42 PM
@trichoplax Since that's the only way of deleting the comment w/o the poster deleting it himself, sure.
 
For the "code... based on... a single character" thing, we need objective winning criteria. So, code golf.
 
Was that "No more comments about downvotes" announcement an actual meta post or just something that got announced in chatrooms?
 
You will be scored based on the size of the static part of the header and footer.
 
@Dennis Is that something that you'd like to advertise (in a meta post somewhere) or just for users it occurs to?
 
@NathanMerrill I think it's just going to be /* because in PHP that only generates a warning, not an error. :P
 
4:43 PM
@Rainbolt only in chat
@CRDrost but what if your code has a /* */ in it?
then it doesn't prevent the code after that from executing
 
You're right. then it's die();. Could be interesting.
 
which works in PHP, but not in every language. In java, you can't just inject a exit() statement at the beginning
 
Does it have to prevent the code running without causing an error?
 
goto 0
No idea how many languages that works in (if any)
 
4:46 PM
So, for //*...// */, the static part is /*...// */. It'll be 7 bytes.
Can the //*...// */ be golfed by putting away the space in // */?
 
I think so...
Doesn't cause any error for me in JS.
 
Sounds similar to this series of challenges
11
Q: m3ph1st0s's programming puzzle 3 (C): “Easy bug”

Bogdan AlexandruThis is the 3rd of my series of C/C++ puzzles; in case you missed the first 2 they are here: (1) m3ph1st0s's programming puzzle 1 (C++) (2) m3ph1st0s's programming puzzle 2 (C++): "Call hard!" I must say that my puzzles are 100% original. If not, I will always state so in the text. My 3rd puzzl...

 
If so, then it's 6 bytes. It's the smallest valid static part in C-style comments.
 
@trichoplax I'm not sure about the benefits of creating an announcement on Meta for this. Non-constructive comments (and y u downvote? is such a comment), get silently deleted, without pointing the "offender" to any guidelines.
 
Reading back on them, those challenges don't seem like they would fit well in the current PPCG environment
 
4:53 PM
yeah, we should close those challenges
 
@Dennis I wasn't thinking of the "offender" - just wondering if it would be helpful to make the flagging community aware that they are encouraged to bring your attention to such comments.
@Dennis Although you may not need flaggers if you get a query for all comments containing "downvote"... :)
 
can mods delete chat messages (I assume so, but I've never seen it)
 
@Rainbolt Thanks!
@Geobits Thanks!
 
@NathanMerrill Yes, they can.
They can also purge the history of an edited chat message.
@TimmyD They aren't. Closed, closed, closed, and closed.
 
How shady.
 
4:58 PM
@Dennis the entire history, or can they go back to a specific revision?
can they outright edit a message?
 
All or nothing.
Yes, editing is also possible.
 
so, if I want to say something offensive, then I need to make sure I edit it into my message after the fact, and then edit it again
 
@NathanMerrill Or, alternatively, you could rethink your decision and not do it at all ...
2
 
@NathanMerrill Not sure what that would be accomplish. The original revision gets nuked too. Also, what @TimmyD said.
 
1
Q: Geometry is So Fun

intboolstringEverybody loves geometry. So why don't we try and code golf it? This challenge involves taking in letters and numbers and making shapes depending on it. The Input The input will be in the form of (shapeIdentifier)(size)(inverter). But what are shapeIdentifier, size, and inverter? The shape ...

 
5:02 PM
@trichoplax That's great as a one time effort, but having flaggers handle new comments is probably better. I'll ask the others if they'd oppose to a formal announcement on Meta.
 
Great :)
 
@Dennis It feels like a lot of work for mods
especially if we start flagging chat messages (notifying mods everywhere)
but then, I'm not a mod, so I can't complain :P
 
No, no, no. trichoplax asked about comments. Please do not flag chat messages for trivial things like this.
2
28 mins ago, by trichoplax
@AlexA. Since users have more eyes than mods, is it OK for us to flag "why the downvote?" comments for mod attention?
 
right. It just seems trivial to flag comments as well.
there are plenty of "non-constructive" comments that don't get deleted, so it seems like the only reason is the "sympathy upvotes", which seems like a trivial reason to flag
 
Of all human flags, comment flags are already by the far the most common type. Adding those to the mix won't dramatically increase the volume.
 
5:14 PM
really?
never would have guessed that
 
Yes. Dealing with comments is one of the few things the community cannot do by itself.
Or is unlikely to achieve on its own, anyway.
Even automatic flags are rather often are of the too many comments type.
We delete a lot more comments then I would have thought before becoming a mod. Mostly because they became obsolete.
 
out of curiosity, how many clicks does it take to remove a comment?
 
I've flagged comments as "obsolete" before, e.g. after someone pointed out typos/small errors. Is that the correct thing to do?
 
@NathanMerrill One.
 
have you accidentally removed a comment then?
 
5:18 PM
Probably. Undeleting is also one click.
 
How about undeleting chat messages, that doesn't work, does it?
 
No, it doesn't.
Also, mods cannot undelete self-deleted comments.
 
ooh, I didn't know you could undelete
it makes sense that it is one click then :)
 
5:36 PM
0
A: Sandbox for Proposed Challenges

Stewie GriffinFill the board with 1-9 Inspiration. optimization,code-challenge You have a 9-by-9 table of numbers ranging from 1 to 9, built up after the following two rules: Each row must contain all numbers 1 - 9 Each column must contain all numbers 1 - 9 The challenge is to place each number on the c...

 
who likes beer?
 
what is beer?
 
...a very deep question
 
:wiki: beer
 
I like my bear.
 
What is like?
 
Are wiki one boxes working?
 
too much security
 
For the "one character switches the code path" thing.
 
5:45 PM
0
A: Sandbox for Proposed Challenges

CR DrostSingle-character static toggle In this task you are given two possibly-multiline sections of code which are themselves valid programs in your language of choice -- and are (mostly--see below) out of your control. You must concatenate these sections with a prefix block, infix block, and suffix ...

 
Yeah, that.
 
When do @New...Posts activate and send in chat new ... posts?
 
every X minutes, where 0 ≤ X ≤ 30
it doesn't seem to be quite a regular cron job, and it probably also depends on the caching of the RSS feeds
At the risk of this looking like self-promotion... I bountied a question of mine over on Mathematica.SE and got some of the most amazing answers outside of PPCG yet. Four completely different (and equally amazing) approaches. (The latest of which solves the original problem perfectly.) So I think those answers deserve some attention:
19
Q: Faces and NetFaces relation in polyhedron

Martin BüttnerI'm trying to generate some plots of polyhedra with coloured faces. To determine the colours, I require the adjacency information of the faces. For the 3D plot this works really well. Say I want to colour the neighbours of a given face: adjacency = Graph[UndirectedEdge @@@ PolyhedronData["Icosah...

@Ampora I'll try to find some time to create the posts over the weekend.
 
Netface and chill?
 
6:04 PM
@MartinBüttner Setting aside the intricate math and mathematica coding, watching those animations of the polyhedral flattening and rolling back up is oddly satisfying ...
2
 
do you guys think this is ready to post?
1
A: Sandbox for Proposed Challenges

GamrCorpsHelp find Mersenne primes! code-golf restricted-source math sequence There has recently been a discovery of a new prime number: 2^74207281-1. This is the biggest prime number to date and broke the previous 3-year record holder by over 4 million digits! Your job will be to help mathematicians fi...

 
@GamrCorps it doesn't seem very interesting beyond being a challenge that requires you to implement your own primality test. all you do is iterate over powers of two instead of natural numbers.
 
Any suggestions to make it more interesting?
 
@GamrCorps go hard core: the length of the program must be a Mersenne prime itself!
 
@zyabin101 How is that better? You write the shortest program you can and then pad it to the next Mersenne prime. All it does is create artificial ties where there were none to begin with.
@GamrCorps Not off the top of my head, sorry.
 
6:18 PM
Thanks anyway
 
what about a challenge that tests if an (arbitrarily large) number is a mersenne number?
actually, nevermind, its simply testing if every bit is 1
 
>finds plate mail
>pet steps on it with no reluctant movement
>puts it on
>cursed
go home nethack you're drunk
 
@TimmyD Check the random polyhedra walk question in the Linked sidebar.
(I might actually use that, minus the graphical output, for another Random Golf of the Day instalment.)
 
6:39 PM
@MartinBüttner It's interesting in that the primality test you implement is one most people have not implemented before (the lucas-lehmer test)
 
@quartata Beat you, cursed gloves that pet stole from shop for started poisoning me and my god was angry with me and disentigrated me.
@quartata How do you tell if the pet is reluctant to step on it? A message?
 
6:57 PM
@MartinBüttner are you still doing Random Golf of the Day?
Also, on the Mersenne primes challenge we can golf two fold:
 
@quintopia is that a requirement?
 

« first day (1818 days earlier)      last day (3041 days later) »