« first day (1606 days earlier)      last day (3376 days later) » 

12:19 PM
@SimonAndréForsberg it sounds a better fit on Programmers than it does on Code Review - though it could do with some work to make it more clear. Caveat - I am not a regular downvoter nor a reviewer at Programmers.SE
 
@dcorking hey
I'd guess that the OP might drop by on Programmers and post the question
 
unless he got scared off from prog.SE
 
 
1 hour later…
1:52 PM
posted on January 25, 2015

A nasty stomach flu had been making its way through the Temple. Fully half the Spider Clan had fallen victim, so to meet deadlines the monk Wangohan had been forced to team with his longtime nemesis, the monk Landhwa. To avoid conflicts that might lead to yet another incapacitated developer, their newly appointed master-in-training Zjing decided that they should work in separate shifts&mdash

 
2:31 PM
Happy Monday morning everyone!!
 
user41796
2:43 PM
@SimonAndréForsberg No, not a good fit. I can't tell if that OP wants to know the standard notation for a Matrix or if they want a review on which function is "better" for the multiplication. I'd VTC as either unclear or primarily opinion based.
 
user41796
@durron597 blech. Monday. :-(
 
@GlenH7 All the answers to this question were so useless. I had to do something.
0
A: Is it possible to make some methods invisible/non-usable to some classes in Java?

durron597You cannot do exactly what you want - see the other answers, but there are a couple of things you could do. You could have a package private interface that exposes the setters, and a public interface that exposes the getters. You mention that you want to use the setters in multiple packages in...

Stunned that the Phill W. answer has 4 upvotes. If I wasn't trying to eek every last bit of rep up to 3k I'd downvote them all
 
user41796
@durron597 Sometimes you gotta take one (or 3) for the community
 
I will once I have 3003 rep :-D
 
user41796
Yeah, anytime you start down the road of "invisibility", your design is in trouble.
 
user41796
2:51 PM
You could also leave scathing comments instead of downvotes. :-)
 
On SO, once a question has answers it's pointless to answer it even if you know the answers aren't quite adequate
 
user41796
Random Rant: I'm really disappointed in The Motley Fool. They used to be a site where you could find relevant, reasonable, and rationale advice. Any more, their just a shill for the "reports" they generate and the funds they attempt to advise.
 
hmmm. that would be a good meta post, perhaps
But anyway, perhaps that's not the case on progs
 
user41796
@durron597 Hence FGITW
 
user41796
@durron597 Definitely not on Progs
 
user41796
2:56 PM
Jimmy has put in several really strong answers because he was disappointed in the ones that were there.
 
Yes FGITW which has been talked about to death, but I wonder if talking about it in that perspective really illustrates the harm FGITW causes
 
user41796
Progs is a site where you want to look to the long term
 
Because I definitely have a habit of not bothering to put energy into answers if I wasn't FGITW, especially if the previous answers are 70% adequate
 
user41796
@durron597 70% is "good enough" for SO... :-)
 
@GlenH7 Unfortunately when you try to take another's finance advice without doing the research yourself, your basically guaranteeing to get screwed
 
3:09 PM
Good investing advice is boring
 
user41796
@durron597 True, quite true.
 
"buy index funds, don't sell them until you need the money"
 
user41796
@enderland For a while, they were able to present articles with a good dose of humor on the side. But once they got into the business of picking stocks and selling that advice, it all went downhill.
 
@enderland That works until the equity market takes a huge dump, which it's going to once of these days
@enderland This is the graph I always show people: research.stlouisfed.org/fred2/graph/?g=Ymm
 
@durron597 it hasn't already?
 
3:25 PM
@ratchetfreak I'm talking like a 1500 S&P500
 
You need a long time horizon, unless you're good at timing the market. Most people aren't; they're better off riding the ups and downs over a long period of time.
For them, Steady Eddie wins over buying high and selling low, every time.
 
@RobertHarvey Right now IS buying high.
 
@durron597 "until you need the money"
historically you almost always are buying high
beacuse the market is often close to alltime highs
 
@enderland Which is NOT REALISTIC. Thank you federal reserve
 
@durron597 Dollar cost averaging.
 
3:31 PM
dollar cost averaging is an inferior long term strategy unless you have a huge amount of money and are willing to lose some potential gain to mitigate risk (which most people are)
generally your longer term return is better without DCA
 
@RobertHarvey Yeah, I just added massively to my oil position :-P
 
Wait what?
 
@RobertHarvey What what?
 
If you're contributing to an equity on a regular basis, you're dollar cost averaging, whether you like it or not.
 
3:38 PM
Expected value of the stock market is higher than cash/securities, so on average you are better off not doing DCA and instead doing lump sum investing
@RobertHarvey no DCA is "I have X dollars, I am going to split it out over Y time periods"
most people do regular contributions from their paycheck and don't actually DCA
 
If you're making regular contributions, your dollars buy less shares when the market is high, and more shares when the market is low.
That's dollar cost averaging.
 
Only if you have the option to make the entire investment at once
> Dollar cost averaging (DCA) [1] is the technique of dividing an available investment lump sum into equal parts, and then periodically investing each part. Dollar-cost averaging is proposed as an alternative to lump sum investing (LSI), which is to make the entire investment immediately.
also:
> The term Dollar-Cost Averaging is also used to describe similar investment concepts such as periodic automatic investment (almost universally utilized by individual investors to fund retirement accounts out of earned income).
 
Yeah, the second one.
 
But if you have say $20k today and plan on investing $20k over 2015, you are better off investing all the $20k now vs periodically
Most people don't have this option though, so they aren't really "choosing" either
 
Well, yeah, if you have it.
The first one sounds more like Asset Allocation.
 
3:42 PM
No
DCA is answering "should I invest slowly, periodically, or all at once" with "slowly, periodically"
 
Why would you do that, and lose the potential growth?
 
That's what I'm saying, you never should DCA if you have the option
 
But you're doing it anyway, if you're investing periodically.
And we already established that most people don't have a lump sum to invest.
Since most people don't know how to time the market, that's all they have.
Most amateur investors buy high when the market is hot, and then panic and sell low when the market tanks.
It's a great way to make money.
All other things being equal, the person who invests in an index fund faithfully over many years is going to be far ahead of the average person who tries to time the market.
 
user41796
You two are actually arguing different questions regarding DCA
 
@GlenH7 it's a terminology thing, more or less
 
user41796
3:49 PM
The bogleheads research assumes you have all of the money at the moment and invest either lump sum or DCA
 
@GlenH7 Last year I "borrowed" money from my cash savings (for a future house) to put money into my IRA/401k early in the year, that's DCA
 
user41796
most folk who use DCA don't have all of the money at one point to invest. So they periodically invest because that's all they've got.
 
In financial services companies, DCA is just used as an illustration to show people that they don't have to time the market.
 
user41796
DCA as advised to the masses is to avoid the buy-high / sell-low timing issues that invariably occur otherwise.
 
Despite what I know about investment (I used to hold a securities license), I'm part of the masses. The only people who succeed at timing the market put a lot of time, effort and research into it.
 
3:52 PM
People are also risk adverse, in general, too, so most people would be ok doing DCA even if they have a lump sum because they have a lower chance of losing -- even if they have a slightly lower expected result
 
@RobertHarvey or get really really lucky
 
There is a guy who publishes a newsletter for an investment strategy that rotates investments around sector funds, on the theory that one sector typically does better in a given market than the others.
Most general-purpose mutual funds are over-diversified, especially the asset allocation funds.
They do that to reduce volatility. But if you're investing over a 40 year time horizon, you don't care about volatility at all, unless the fund completely collapses.
In fact, volatility actually helps you, if you're dollar-cost averaging.
It's hard to make money when half of your mutual fund is growing while the other half is shrinking.
 
I have returned from vacation
anything interesting 'round these parts?
 
@RobertHarvey that's why you just get index funds
:)
 
Index funds are not a bad way to go, if you start early enough. Most people don't.
@whatsisname Just free armchair investing advice.
 
4:03 PM
enderland is :)
 
I'm nearly 100% index funds
 
My current 401K is asset allocated. I need to fix that.
 
that's my general plan. Every birthday I rebalance it and will do that forever, I guess
 
@enderland Use that to plan your investments.
 
user41796
4:55 PM
@RobertHarvey Given that you can roll that 401k into an IRA if you chose, be sure to check with your favorite brokerages to see if they're offering incentives to rollover into an IRA. Scottrade was offering some serious bucks based upon amount transferred in.
 
5:37 PM
@GlenH7 as long as you put it into a good investment (ie low cost) that can work out
expense ratios should be really low. most places offering that sort of thing probably have high ones
 
user41796
@enderland My experience has been that the non-employee administration fee is high enough to warrant rolling the 401k into an IRA
 
user41796
Getting a bonus to do so is just icing on the cake
 
Yeah, but I mean in terms of the funds you have in your IRA
 
user41796
Not sure I follow - an IRA is simply a tax sheltered investment vehicle that allows investment in your choice of bonds, funds, or stocks. My experience has been that an IRA provides a much wider and efficient (lower cost) range of options to pick from over a 401k
 
user41796
Granted, you have the ability to shoot yourself in the foot with your IRA if you make really bad decisions; but that's the other side of what you're saying with what to invest in.
 
6:01 PM
it all depends on how your 401k is managed
where I work it's basically a fidelity investment account and I deal with it myself
there is noone that manages employees 401ks
whereas a lot of places have someone that manages it and screws everyone over
whereas for me there is noone to screw it up besides my self
 
Employer^ had Fidelity, but they changed to a provider that had lower fees. Nobody really liked the new provider, AFAIK. Some people were using self-managed accounts, and the investment fees from the new provider were much higher.
In case y'all missed it, another "premature optimization" abuse was sighted yesterday. This one extends the notion of "premature optimization" to "features you might not need."
I would advice against building this new method until the need for it is shown. "Premature optimization is the root of all evil". This might have the added benefit of making possible to bring the functionality to a productive state in shorter time. — h7r yesterday
 
7:06 PM
lol
the funny part is his defense
 
7:48 PM
@whatsisname yup, you want to basically have really low cost index funds
we have about 1/3 of the funds at something like 0.05 for expense ratios
 
8:47 PM
i need to clean my office
 
gah, since when has reuse become a bad word? Years and years spent trying to come up with how to make code reusable, and all of a sudden I'm finding more people decrying it as a farce just stating "Code reuse is a myth!" as a ways of getting themselves off the hook for trying to do anything in a decent, abstracted, or reusable way. Pfleh.
Bums.
the whole industry was focused on reuse for so long, but apparently there's a rallying cry these days to just throw it out with the bathwater
 
lol
 
9:11 PM
@itsbruce Barbie Horse Adventures is a serious mathematical simulation of the highest caliber, it's pidgeon holing FP into overly-complex numerical projections like matrices describing the physical shimmering of Barbie's hair over a discrete period in a variety of possible real world environments that convinces people to completely dismiss it as irrelevant to their every-day business problem coding. — Jimmy Hoffa 27 secs ago
...it couldn't be helped. Somebody had to say it.
 
9:54 PM
There will be no way to convince you one way or another regarding this topic without you first actually learning FP. Making judgements about its merits is something you're going to find yourself decidedly underprepared for without taking the time to pick up and work with a true FP language for a while to understand the FP approach. It won't make you forget the OOP approach or make you dumber, so why not just take the time to learn it yourself? You're unlikely to grasp or understand the distinctions people are trying to explain here if you only understand the OOP half of your question. — Jimmy Hoffa 35 secs ago
^-- only time people argue about how terribad FP is compared to OOP is when they don't even know FP. The argument acts like a safety blanket so they can feel like they're not missing out on something by not putting the effort into learning it
 
@JimmyHoffa Code reuse is quite difficult. Most business programming is about doing things that have been done over and over again before, but with subtle, nearly infinite variations.
 
@durron597 speaking of something with such crimson words as "In addition to being an advocate for an ideology directly responsible for tens of millions of non-war deaths and untold human misery, [...]" without also pointing out he refers to an arena of concepts so large that the same statement could be attributed to all alternatives. Not encouraging communism myself, just discouraging such blatant attempts at evocation without explanation.
 
@JimmyHoffa Yeah the federalist is not a super great source for unbiased analysis
 
10:07 PM
@RobertHarvey nobody said it's easy, but deciding it's hard so let's not do it is no solution, but a decision to perpetuate the problem because you don't want to think about it.
 
however, it's still true that communist nations have been much worse polluters than capitalist ones over the last century
 
Some of the abstractions people have come up with to attempt code reuse... Well, you're probably better off just writing new code in many cases.
Besides, reinvention is much more interesting than setting endless parameters on some guy's dependency-injected factory factory factory.
 
@durron597 oh yes, they've also been worse economies than capitalist ones, and capitalist countries with horrible economies are similarly in the league of terribad-polluters, so what's the cause, economy or government? Maybe they caused eachother and the pollution's a side effect? No one knows. Causation and correlation 'nat
 
Or worse, their communist dependency-injected factory factory factory.
 
@RobertHarvey what's worse about that? Communism is great at factories, it must be, that's like all they make. Communism is a Factory factory apparently
 
10:10 PM
[combines two conversations into one... Levels up]
@JimmyHoffa So what did you think about my answer on that "FP is wierd" question?
 
@RobertHarvey the math point is a minefield because it's a weapon used against FP folks "Sure it's good for like..math stuff... but nobody needs math, we've known that since kindergarten so we don't need your stupid crap!" ok well that's the inbetween-the-lines feeling people try to evoke when they refer to FP being used for math. Your point about it is well made though and true. Math doesn't just mean right angles, and is a beneficial tool for solving genuine business problems
 
Alright. It has 5 downvotes, so... Just wondering.
 
I like it, it and the one about EDSLs are the only ones I voted up
@RobertHarvey the comments betray that Q has become a debate forum for people to batter their opponents. The -1s are probably just people tired of hearing about FP and seeing code they don't understand
They clutch their security blanket "That stuff is crap! (so I don't have to learn it...) Blub is surely better than their language because I don't know anything better than Blub so it must be the best!"
 
10:25 PM
@JimmyHoffa Do you consider yourself a fast coder? How did you get fast? Do you just code a lot?
 
i think that whole FP question relates to an earlier immutable type question
where the answer boils down to: different techniques are appropriate for different problems, and you don't have to use a single method
you can mix and match where appropriate
 
Probably. Immutability is the dirty little secret of business systems, since they're all about mutable data stores at their core.
It's the difference between filling up my car with gas, and replacing the entire car with one having a full tank.
 
right
for some applications, replacing the entire car 50 times as the tank fills is a reasonable and effective way to think about it, other times it's not
there is no silver bullet
 
10:45 PM
@RobertHarvey I do, I suspect it's somewhat a side effect of having learned on my own largely by reading and writing code. Writing code is the most comfortable way for me to learn about something I find, so it's the first tool I reach for. Just causes me to practice it a lot I guess, whereas lots of people reach for a book first.
@RobertHarvey let's be honest: You would totally prefer the ladder.
 
@JimmyHoffa I reach for books first, but I'm finding that a lot of it won't stick without writing some code. And then once I write some code, I know it at a whole 'nother level.
 
can someone idiot check my syntax real quick
tar cvzf out.tgz * made a file that was a little too big
so i did tar cvf - * | gzip -c --best > out.tgz
correct?
 
11:36 PM
@durron597 I read that as "Can some one-idiot check my syntax real quick?"
 
@RobertHarvey What's a one-idiot check? :-P
 
Can some "one idiot" check my code?
 
@durron597 half of what a two-idiot checks?
 
[joke falls flat... can hear crickets]
 
"Very not. Mike, you want to discuss nature of humor. Are two types
of jokes. One sort goes on being funny forever. Other sort is funny once.
Second time it's dull. This joke is second sort. Use it once, you're a
wit. Use twice, you're a halfwit."
"Geometrical progression?"
"Or worse. Just remember this. Don't repeat, nor any variation.
Won't be funny." - The Moon is a Harsh Mistress (Heinlein)
argh --best is still too big. gonna have to use split i guess
 

« first day (1606 days earlier)      last day (3376 days later) »