« first day (1352 days earlier)      last day (3641 days later) » 

1:26 AM
0
Q: Restricting object types that can be added to each other using the Composite Pattern

Steve ZurekThe Situation: I am building a custom PHP application framework. I have implemented a composite pattern so I can build a object tree representing the page to be rendered. Example: abstract class \Block\BlockAbstract { protected _blocks = array(); public function __construct($properties...

^--- Aside from the fact that my opinion is the basic premise is a bad idea, that's a very good question. Think I'll hazard coming up with an approach... If anybody has any ideas I'm curious to hear them
One immediate thought that comes to mind is a parser that generates the block types as a pre-compiler, since he's creating a type system for a runtime-typed language, and he wants good validation of the type system, creating a compiler-tool-thing that generates and or validates the block relationships before runtime might be a good approach
 
 
1 hour later…
user55340
2:57 AM
I am not a fan of twitter, devops, or borat... that said... twitter.com/DEVOPS_BORAT
 
user55340
In startup we are practice Outage Driven Infrastructure.
 
user55340
Devops good news! Devops is 100% peoples and culture so you not have of understand functional programming!
 
user55340
In startup we are have new problem of deal with Big Metadata.
 
user55340
When you are run DROP DATABASE you are have of many problem but Big Data is not of one of them.
 
4:32 AM
@MichaelT Still bitter. Hahhaa
 
user55340
4:42 AM
@Ampt Read some of that Devops borat and enjoy.
 
1:54 PM
@MichaelT not a fan of devops?
 
 
1 hour later…
user55340
3:22 PM
@JimmyHoffa most of the times I've seen things pro porting to be devops, its been "we don't have the QA or operational resources, so devs are going to do them too..."
 
user55340
Its one thing where everything is nice and small and, well, you've got a total of 5 people who are doing all of development, operations and QA in a startup environment.
 
@MichaelT oh.. yeah that's a fair enough way of describing why we're moving that way... to be certain, we have IT and QA resources, we're trying to go towards devops because our resources are terrible...
but then we're not doing all of IT, just going to be managing our stuff
which still seems wrong to me..
 
user55340
The thing is, when you are at 'enterprise' sized products, the devops resources get streached way too thin.
 
@MichaelT yeah, which we are...
we'll see what happens
that may happen, it's a risk we're aware of, we're planning on adding as much automation and instrumentation throughout the system as possible so hopefully it will be very easy for us to manage but who knows. We can always just say "Hey IT, you guys do it" if it fails, it's just that usually turns up more problems than us doing it around here..
 
user55340
The thing is, Dev and QA and Ops tend to have different perspectives and maintain a different what is working thought...
 
user55340
3:27 PM
Dev is "the code is right", QA is "the code is wrong - I'm going to find out how", and Ops is "The system is working, don't blame it... ok, I'll fix it"
 
user55340
Trying to put all three of those mindsets into a single team means something gets missed.
 
user55340
Dev testing their own code - tests the happy path. Something doesn't work? The system is broken, not the code.
 
user55340
In some environments, Devops is strictly forbidden. PCI for example - you can't have development environment and production environment mix. That means that your development machine can't connect to the production databases or servers. At all. That might be a bit extreme of a reading of PCI... but you get the idea.
 
user55340
Don't let the devs onto the production systems. Hot fixes are bad... those are things I want in places that touch money.
 
user55340
You really need to have four teams... Ops, QA, (new) Dev and (bug) Dev. Sometimes the two devs get mixed... but the bug dev is something that is the one that keeps the new dev from having to worry too much about context switches to old code lines.
 
user55340
3:35 PM
It sounds neat to have someone who does the hardware updates, keeps the bug tracker running, keeps the databases running, does the quick fixes, and writes the new code... but that means that none of those tasks gets the attention that they really need.
 
user55340
Its part of the 'cloud' world... hey, we put all our stuff in the cloud, now we don't need to worry about most of the database admin, or our servers... everything is now just writing code. But it isn't.. and so you've got devops. But its based on a mistaken assumption that everything in the cloud just 'works'
 
user55340
>
Developers can end up being tasked with other roles, such as database administration, quality assurance, or testing, while the people in those roles are not going to be tasked with software development, says Knupp, a software engineer at online advertising company AppNexus. (He says in his own situation, he has a fine relationship with his company's operations team.) "What began as an experiment aimed at increasing software quality has become a farce, where the most talented employees are overworked (while doing less, less useful work) and lower-level positions simply don't exist." The ef
 
@MichaelT perhaps I misunderstand devops, I thought it just refered to devs having an active hand in the deployment/configuration/maintenance of the production environment and approaching it from a development standpoint of writing tools where valuable but focusing on automation etc so it minimizes the need for maintenance activities etc
We would never be involved in managing the IT stuff outside of just our server shit on production systems etc
 
user55340
Its one of those things like "QA" and "Agile". 95% of the places when they say "QA" they mean "tester"... and "Agile" means "just code it like a cowboy".
2
 
user55340
3:47 PM
The Dev part of software is often creative and innovative...
 
user55340
but QA and Operations need to be disciplined - QA isn't testing, its making sure good code is written and deployed through various processes and checks. Operations has auditing, and not giving everyone root on the production systems - if you really need it, use sudo... with the appropriate logging to make sure if you do mess it up, you can find out what you did and fix it.
 
user55340
Mixing the "free spirit" of dev into those areas - yes, the devs get a better view into it, but it also means that those often lose the discipline associated with their profession.
 
user55340
And so when I hear "devops" I hear "we're cutting back on QA and Ops, having the devs do them during the time they normally spend thinking about how to do the next thing that we don't really understand why they just stare at the screen."
 
user55340
Need a new database? Just go create it... you're devops. Bad data in production? You know it, fix it...
 
user55340
Its one thing to have devs be the third person you call when something goes wrong after operations has gone into it. Its quite another to have 'devops' be the only ones with the pager...
 
4:37 PM
@MichaelT whoa yeah, I would not sign up for that shit.
 
user55340
@JimmyHoffa The ideal and reality of ${buzzword} are rarely the same.
 
user55340
Found an early project euler problem that fits very nicely into functional coding mindset.
 
user55340
> 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.

What is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?
 
user55340
Its clear as recursion, map, and reduce in my mind...
 
user55340
Take the range 10..12 as an example. Find the prime factors of each of the numbers and map them: 10 .. 12 => {2=>1, 5=>1}, {11=>1}, {2=>2, 3=>1}. Then reduce that list to the max for each power: {2=>2, 3=>1, 5=>1, 11=>1}
 
4:59 PM
that is just multiplying 2520 with 11,13,2,17 and 19 (all of the primes and the extra 2 so it divides 16 )
 
nonsense
    Says "48÷2(9+3) = " is an unknown unsolvable equation! Bullshit.
    It's the same equation as this, and this is a very obvious and solvable equation:

       48
    ______

     2(9+3)
 
it's just badly written
and unclear whether it means (42/2)*(9+3) or 42/(2*(9+3))
that's the only issue with that
 
@ratchetfreak doesn't matter, the thing that frustrates me is there's a bunch of people saying "O see math doesn't have a solution for this very simple equation!" nonsense, math easily has the answer
the equation can be rewritten in the form I said and it's an identical equation with no change in precedence rules or additional parenthesized terms etc, it just makes clearer what the precedence rules are
but those precedence rules are defined and are known and people who say they're not are just trying to show how confusing math is which helps no one by making faux confusion
 
just like the troll proofs of 0=1
 
5:32 PM
@MichaelT after giving a bit more thought to your "theory" about that decorator guy, I think it explains my observations fairly well
 
user55340
5:50 PM
@gnat The problem with the questions he asks is that he really needs to sit down and do the fundamentals, but that can't be an answer to the questions he's asking.
 
user55340
@ratchetfreak Yep, but the thing is to write some nice FP code that does that correctly (partly so I can get my head around map / reduce).
 
all the numbers from 1 to 20
let n = [1..20]
smallest positive number
let p = [1..]
that is evenly divisible
let remainderless x y = mod x y == 0
by all of the numbers n
head $ dropWhile id $ map (\x -> and $ map (remainderless x) p) n
no reduction necessary, iterate from 1 forward, stop dropping things when you get a true, take the head from there and you have the smallest because you iterated up from the bottom
 
@MichaelT yes indeed. Hits "Ask Question" too early...
151
A: How much research effort is expected of Stack Overflow users?

user414076A lot. An absurd amount. More than you think you are capable of. In fact, asking a question on Stack Overflow is the absolute last thing you ever want to do. You want to avoid it at all costs. You want to think of it as a horrible shame1 that will forever haunt you and pass down from you to your ...

 
6:08 PM
actually that just get's you the first true, but I forgot to carry the value along with it. Correctly it should be:

snd.head $ dropWhile (not.fst) $ map (\x -> and $ map (\y -> (remainderless x y, y)) p) n
@MichaelT $ means parenthesize everything on the right side of this point
obviously that's naive though
it's a full iteration solution with no culling
 
6:31 PM
posted on May 17, 2014 by Stack Exchange

A Jaime Zawinski quote raises questions about regular expressions.

 
user55340
7:23 PM
@Ampt did you know about this? The biggest arcade in the US is in Chicago... and its $15 for a day pass (games don't take quarters).
 
user55340
I'm also trying to understand this Ars's graphics:
 
user55340
 
user55340
The other ones make sense when you think about them for a bit...
 
user55340
 
user55340
 
7:35 PM
@MichaelT looks like a suppository...
 
user55340
@ratchetfreak You have a problem. You said "I know, I'll use a regular expression!" Now you need to stuff this up your...
3
 
user55340
 
dances with wolves is boring. Suck It Saturday continues...
 
 
3 hours later…
user55340
10:29 PM
Woo woo! Silver badge (Thanks Sam) programmers.stackexchange.com/help/badges/55/…
 

« first day (1352 days earlier)      last day (3641 days later) »