« first day (1829 days earlier)      last day (3160 days later) » 

user20683
12:11 AM
@AshleyNunn rages at his current internet
 
Folks, I'm reading about refactoring technique Replace Type Code with State/Strategy (here). The text contrasts Replace Type Code with State/Strategy and Replace Type Code with Subclasses.
> You have a coded type that affects behavior but you cannot use subclasses to get rid of it. [Otherwise you'd be able to use Replace Type Code with Subclasses.]
Since I'm green, I haven't yet been in a situation where I can't create subclasses. In what circumstances can such handicap occur?
 
where the base class is some class in another library you don't control. If there's no virtual function, you can't effectively subclass it.
also, subclassing should general be avoided in modern OO approaches.
 
user15026
12:30 AM
@WorldEngineer no worries, I'm not home yet anyhow. Still hanging out with people.
 
This might be better off on the Programmers Stack Exchange which is "a question and answer site for professional programmers interested in conceptual questions about software development.". — Wai Ha Lee 20 secs ago
 
@Telastyn If it's in a some library and I can't subclass it, then neither I would have access to do the surgery needed to install the strategy into into that class.
 
no, but it's far easier to implement a strategy associated for that type than to try to get a type code working for it.
 
easy, but horrible.
 
12:45 AM
> subclassing should general be avoided in modern OO approaches
I need to think about this. Is there something I could read to better understand the rationale behind this?
 
user55340
@Ixrec Looked at recent SQLite changes?
 
user55340
And while this one doesn't actually hint at its json implications: sqlite.org/src/info/2131a5ca53f0e9b0
 
user55340
BEGIN TRANSACTION;
CREATE TABLE json_tbl(id integer primary key, json text collate nocase); CREATE VIEW json_tbl_view AS SELECT id, json_extract(json, '$.value') AS val FROM json_tbl;
CREATE INDEX json_tbl_idx on json_tbl(json_extract(json, '$.value'));
EXPLAIN QUERY PLAN SELECT * FROM json_tbl_view WHERE 'the_value_33' = val;
COMMIT;
 
user55340
 
12:51 AM
@ratchetfreak no sir but i figure it out .. i was using return in wrong way
 
user55340
@MetaFight doesn't that count as being not homeless?
 
user55340
38
Q: Why should I prefer composition over inheritance?

illmathI always read that composition is to be preferred over inheritance. A blog post on unlike minds, for example, advocates using composition over inheritance, but I can't see how polymorphism is achieved. But I have a feeling that when people say prefer composition, they really mean prefer a combin...

 
user55340
@NickAlexeev the one sentence way to describe that is "modern OO is about combining interfaces rather than trees of inheritance"
 
user55340
The general finding is that most of the time, inheriting code isn't useful at all.
 
12:54 AM
sorry, was dealing with the dog and playing a game
 
user55340
So... I was recalling a program that I worked on at Employer^^^ - before perl to real database became feasible. This was the late 90s. Everything was done with Berkeley DB ( en.wikipedia.org/wiki/Berkeley_DB ), a KVP database. ( @user------- this would be of interest for you)
 
also, most places where you would use a type code, means you care what type it is. Subclassing means you get into if X is T{} garbage everywhere. Associating logic implicitly with the type name itself is a anti-pattern
 
user55340
There were four different index databases that were of the form "key":"id:abc,id:def,id:xyz" and then one "id:xyz":"object" database.
 
user20683
I feel I should point this out:
 
user55340
12:59 AM
So, you wanted to lookup the intersection of two keys? find each in each database, then pull the set of each, parse, do the set difference, and look up the objects in the id:object database.
 
user55340
Yes, switching to oracle was a bit of a challenge for thinking about our data in a new way, but it was so much better once you thought that way.
 
12:07 PM
@MichaelT Yes, that sounds like a challenge which an RDBMS can take off you. My previous code was key/value (Android SharedPreferences). Worked when sorted by date, yet, as you pointed out, more complicated use cases get harder and harder. (Thanks a third time ;-) ) Yet, MongoDB can probably do that as well as a RDBMS while being less in the way.
 
 
3 hours later…
3:00 PM
Better suited for Programmers SE. — Jonathon Reinhart 23 secs ago
 
3:12 PM
oooh, we just got next privilege/badge progress bars in the patented StackExchange multi-super-collider-dropdown
...even on sites that still don't have the new profiles with those bars
 
 
1 hour later…
4:24 PM
I think StackOverflow is not the right place for this question. In addition to being somewhat likely to draw out opinions instead of hard answers, it isn't exactly a question about coding – more a question about managing code. If the opinion issue were resolved, it might be suitable for programmers.stackexchange.com. — kojiro 54 secs ago
 
user55340
@Duga Opinions are no more appropriate on Programmers.SE than they are on Stack Overflow.
 
to be fair, he did say "if the opinion issue were resolved", he didn't suggest PSE is for opinions
 
Well, here is the What topics can I ask about… for programmers.se. There is no guarantee that there is a site on *.se suitable for every domain, but read the help and see if you think your question fits. In my opinion, you can craft a question suitable for programmers.se that will give you a useful answer, but the above question, verbatim, is not it. — kojiro 20 secs ago
As a Programmers.SE regular, I can confirm kojiro's statement that while this question is on-topic for our site, it is currently far too broad and underspecified to be well-received there. — Ixrec 37 secs ago
 
user55340
@Duga phew... ok... that's better.
 
lol
you should've commented if you were worried
 
user55340
4:40 PM
-1
Q: What is a good strategy for making code public?

cade galtI was just going to git push my entire app to github, but I'm not sure I want my web application completely cloneable. What is a general strategy that other companies adhere to for visibility and security? All the front-end code ( html | css | javascript ) is accessible any ways through the bro...

 
some days it's hard to be sympathetic to newbies
good thing I have CVs left
 
user55340
I'm out.
 
cya
 
 
1 hour later…
5:53 PM
you aren't getting anywhere "good at identifying..." at the site asker is asking about - UX.SE, it doesn't have Triage (note migration notice at this question). Please avoid bragging about luxury features available only on the "main" site in the network (Triage, push from Hot Network Questions after 7 hours, dupehammers etc) — gnat 29 mins ago
^^^ how about voting down the commented answer for blatantly ignoring that there are other sites in the network besides Stack Overflow? I particularly love the part "Stack Overflow shares many characteristics blah blah" answering a question migrated from UX.SE
 
honestly, I have no idea what part of Tim's post your comment is meant to be a response against; everything he says seems like it applies to all sites with or without a Triage system (plus the OP did mention SO specifically)
hm, do you mean the "before getting full visibility" part?
come to think of it, what happens to SO posts that fail triage? is it any different from the usual downvoting and close voting the OP is likening to bullying?
 
6:53 PM
Questions that ask "where do I start" are typically too broad and are not a good fit for this site. People have their own method for approaching the problem and because of this there cannot be a correct answer. Give a good read over Where to Start, then address your post. — Kyll 7 secs ago
 
close and delete
 
7:26 PM
I'm voting to close this question as off-topic because this is a programmer's question, but not a programming question. There's the programmers' stackexchange, and finding that via the stackexchange button in the upper left might prove basic web usage skills and increase hirability. Other than that, the question is obviously too broad. — Marcus Müller just now
@MarcusMüller Career advice is off-topic on Programmers.SE. Just because OP is a programmer does not mean all of his questions are on-topic at PSE. — Ixrec 1 min ago
 
8:04 PM
we have , wow
 
 
1 hour later…
9:09 PM
^^^ lyrics to tag wiki?
 
 
2 hours later…
11:09 PM
It's nice to be vindicated.
15
A: Dupe Hammer too powerful?

durron597I am the person who closed the question. There are some factors you are not considering: While you were outraged that the question was closed, the person who asked the question never came back, despite the fact that you and I were commenting on their question. Maybe it did help them, you don't ...

 
11:56 PM
If I post a question, am I required to have code in it?
 

« first day (1829 days earlier)      last day (3160 days later) »