« first day (886 days earlier)      last day (3429 days later) » 

00:00
RELOAD!
[Vogel612/TypesafeSwing] Vogel612 created repository
There are 1575 unanswered questions (94.2895% answered)
0
Q: Ambiguous "Abstract" in type name

Amadeusz WieczorekRecent changes to a compiler projects create ambiguous use of the "Abstract" word in class names. Particularly, we have class AbstractTypeData which inherits from TypeData and handles abstract classes. We also have a few abstract classes, called AbstractTestFinder and AbstractTestWorker. We cre...

Smart interrupt, there, @Vogel612
00:21
@rolfl lol.. unintended consequence.
Also I so regret this now. How did I get the dumb idea to wrap swing into a proper OO API?
It took literally 2 hours to wrap a single class.. and it definitely doesn't work right now....
Sounds like this is a major project. Don't give up!
I think I will research deep into lombok to generate code for default wrapping
Anyways, bed. I will make tomorrow a productive day!
00:38
Swing??
> Swing: Making your applications ugly, one box at a time!
> Stack Chat: Making you laugh - one message at a time.
Found this in my COMM book today: dilbert.com/strip/1996-10-07
"is anyone aware of a simpler solution that I might have overlooked?" is a request for code review, which is off-topic for Stack Overflow, which is tasked with helping debug broken code. Instead, for working code you should ask on Code Review. — the Tin Man 47 secs ago
I'm voting to close this question as off-topic because it is about code review, and should be on Code Review. — the Tin Man 49 secs ago
01:16
I'm scared. I just turned R# off, then ran a unit test before it shut down.
What will happen?
OK, it didn't register to turn off, I guess.
Movie exporting... get ready...
0
Q: Taking some Python code and making it more functional

CodingoI'm a C# developer looking to learn more about Python and how to think in a more functional programming manner. I have the following which takes a series of grades and returns the average: grades = [100, 100, 90, 40, 80, 100, 85, 70, 90, 65, 90, 85, 50.5] def grades_sum(scores): total = 0 ...

possible answer invalidation by Antonio Ortiz on question by Antonio Ortiz: codereview.stackexchange.com/posts/106767/revisions
Sounds awful :P
Video is good, though.
01:32
0
Q: How do matter and antimatter interact gravitationally?

Ethan BierleinMe and my brother were watching television tonight, and he asked me a question that was somewhat along the lines of this: What would happen if the Earth was made of matter, and the moon was made of antimatter? I tried to answer this, saying a few things about how atoms attract, and such, bu...

Cross-site pimp
gravity is gravity
there's no such thing as "anti-gravity"
@Mat'sMug You sure?
totally
I think it just hasn't been discovered yet.
Totally not serious
21
Q: Why is gravitation force always attractive?

New HorizonWhy is the gravitational force always attractive? Is there another way to explain this without the curvature of space time? PS: If the simple answer to this question is that mass makes space-time curve in a concave fashion, I can rephrase the question as why does mass make space-time always cur...

01:35
So, we just need to find negative mass first.
Anything else that can be reviewed here? codereview.stackexchange.com/questions/106789/…
I think I chopped it down to 4 lines...
Particle physics is incredibly interesting.
It is.
1
Q: Musical Fizzbuzz

PhrancisI made several classes using ChucK : Strongly-timed, Concurrent, and On-the-fly Music Programming Language and would like a review. I broke down the logic into a number of classes, all of which are shown below. This is pretty new to me, and I would appreciate any and all constructive criticism...

This might belong to codereview.stackexchange.com, but read their how to ask first!Baum mit Augen 50 secs ago
gosh, the thread-safe logging class went hot for some reason
01:38
Physics in general is extremely interesting.
It is. So is Chemistry.
@user300224 It's very helpful. Know you know what terms to look for in the next book/tutorial you read. — Mast 11 hours ago
haha how to shut off a vampire like a chief
@CaptainObvious @Phrancis What recording software do you use? I've tried to find some, but the one you're using seems to be pretty nice.
@EthanBierlein I believe he used QuickTime player in Mac.
@EthanBierlein Hmm, several, are you interested in any part specifically?
01:41
Usually just screen + audio, and an option to record voice.
My U uses Camtasia Studio: techsmith.com/camtasia.html
I used Quicktime + Soundflower for the screen capture including the computer audio. I used iMovie to assemble it and do the voice-over and background music
(and export it to upload to YT)
I use PS Premiere Elements for my video editing, as you all probably know after my griping last spring...
@Phrancis are you on RedBull or something? :D
@Mat'sMug What on earth made you think that? :P
01:44
/irony
@Mat'sMug No, just coffee ;p
decaf? ;-)
The voice over is a bit disjointed because it was not recorded while I was doing the video
I like the result
01:45
Me too.
But overall, I just sound like that ;p
haha
needs a drum track
> An error occurred. Detailed message: 4 conflicts prevent checkout
-1
Q: This code accomplishes some what of a design

noob1992I have understood that design patterns are just some things to be followed but not needed to be . Uhm I have a question as to can this code be done better , it basically is supposed to be somewhat of a bridge pattern for a specific calculator costs as though it should be implemented by an interfa...

@CaptainObvious This title accomplishes bypassing the no title rule
01:47
Musical FizzBuzz - Mind = Blown #programming https://m.youtube.com/watch?v=fQ3kYQgtUpo&feature=youtu.be
@Phrancis Shoutout for ya ;-) ^^
You mean "blown" => mind right ;)
Thanks :D
> Our compiler is old. There are comments in the source from 1982, which was when Microsoft was just starting its own C compiler project.
@EthanBierlein I totally read that as "(Musical FizzBuzz - Mind) = Blown"
Hey @Phrancis
Hey there @june1992
There we go. I've pinned the tweet now. ;-)
01:51
ugh. am I turning into a jerk?
Please fix your code blocks (needs 4 spaces), and while you're at it a more meaningful title that tells us what your code is doing would be useful, too; showing us your actual, real code (or your real code really says //logic here//?) would also help you get reviews, instead of downvotes. — Mat's Mug ♦ 20 secs ago
No, I don't think so.
possible answer invalidation by Jamal on question by Jim: codereview.stackexchange.com/posts/106761/revisions
No not really I think I just go the wrong idea of making design patterns
hey @june1992
I'm not sure even If I should I just got this weird idea watching some vids but I think I am far beyond that video
yes
I mean below
sorry
far below that
01:57
hey no problem. your post is very much unclear at it stands though
Well it is supposed to inject a interface instead of a class
I think you need to stop implementing design patterns for the sake of implementing design patterns; design patterns aren't about the buzzwords...
well it was more a design
But okay
It's useful for learning, but if you really want to learn them, use them in a less examplish way.
02:00
You need to start writing simple programs more than design patterns. Eventually, you will find yourself using design patterns in your programs.
I should be writing a database with @Phrancis but I had the internet shut down for a while aha ...
or helping like second hannd help
a CRUD app is a good "simple" problem to solve
What is
that
02:02
I do need to get back to that. Finally got that damn builder working how I want it to, now just gotta make it use the database, which is simple enough
CRUD - Create, Read, Update, Delete
Is that for working with files
Designs are only useful to the extent that they are used :)
or database
file, database, whatever
Well I think I should give that a rest haha like really
02:05
making a CRUD app that can work off CSV files and switch to a database storage, would be an excellent way to get some real abstraction principles in action
the world is a CRUD app
ok, not the world. Facebook.
Are most programmers packrats?
> The world is a vampire, sent to drain
Secret destroyers, hold you up to the flames
@Hosch250 That's an odd question, why are you asking?
Because I save ConsoleApplications.
I've had like 30 of them at one time before.
02:09
oh god that sounds horrible
I delete stuff pretty much as soon as I no longer need it
If I have a project that I don't need or want I immediately get rid of it.
I have to go through and throw them away.
(exception is data; keep it as long as you think you may have to look for it, then a bit longer)
If it is something more than a test project, I name it something reasonable (I didn't use to).
02:13
and yes isn't abstraction like a has-a and a is-a like has-a is composition and is-a is inheritance or something like that I don't know
Yep, has-a is like composition and is-a is like inheritance.
abstraction is simpler than that
Like how
when you write a function that does something, you're abstracting its implementation behind an identifier: that function's name takes the place of the implementation.
when you call WriteToFile(filename), you don't care about the inner workings
Oh that seems more into depth actually
oh
02:16
a class is another level of abstraction: you encapsulate functionality into objects
now, you have concrete types, and abstract types
an interface is abstract
it has no implementation
it just defines the "shape" of what an object looks like
it's a "different kind" of "abstraction"
there's "abstraction" as in "level of abstraction"
Night CRitters
then there's "abstraction" as in "shape of an object"
'night @EthanBierlein
so if you have some IWriter interface
02:20
that specifies a void Write(string data) method
you can have an implementation that sends it to a database, and another that sends it to a text file
IWriter is the abstraction you're coding against, yes
I get it
great!
So do you know anything what an IoC is
I have yet to study about that it sounds like it needs to be known or yeah like studied upon
Dependency Injection simply means whoever is going to need to use that IWriter abstraction, is going to tell whoever instantiates it that, well, it needs to use an IWriter - and it does that by declaring an IWriter constructor parameter
Would like to know what it is actually because I have tried to read about it but it sounds very complicated kinda
02:24
public class Service
{
    private readonly IWriter _writer;
    public Service(IWriter writer)
    {
        _writer = writer;
    }
}
What is a service that what is kinda confusing to me
it's just a bogus name for something
call it Foo if you want
some class, say App, is going to be creating an instance of this Service class right
Yes
So Service has App
var service = new Service(new ConcreteImplementationOfIWriter());
02:26
now, App also has a constructor
Oh I see it used dependency injection first
yes I saw that
my mistake
good
now, IoC containers simply automate that part
Explain :)
take Ninject - it calls its container a "kernel"
so you configure the kernel and say
_kernel.Bind<IWriter>().To<ConcreteImplementationOfIWriter>();
What exactly is this container
02:28
let's say the top-level class, the entry point is the App class
with a Start() method
    private IKernel _kernel;

    public void Start()
    {
        _kernel = new StandardKernel();
        _kernel.Bind<IWriter>().To<ConcreteImplementationOfIWriter>();

        var service = _kernel.Get<Service>();
        //...
    }
the container is just some kind of "mapping" between interfaces and their implementations
you don't need an IoC container to do DI
So how do we map the interfaces to it's implementation
Yes I am aware of that also about the DI not needing an IoC
02:31
public void Start()
{
    var writer = new ConcreteImplementationOfIWriter();
    var service = new Service(writer);
    // ...
}
So what there is the IoC
@june1992 that's specific to each IoC container - Ninject uses a fluent syntax for bindings
the first Start() method above is with an IoC container, the second is without
What does the To<>(); do
or is that the mapper
it maps IWriter to ConcreteImplementationOfIWriter
using generics ?
well I mean see that IoC now how it maps
02:34
so when you request a Service (whose constructor says "give me any IWriter"), ninject sees the IWriter and knows to inject that concrete type
So Bind<>() is a Ninject method as also To<>()
Oh that is what is confusing
other IoC containers have other methods of configuring these mappings
some use XML
Okay so an IoC just maps out an interface to it's implmentation
02:35
you could say that
So is IoC something that can be done without Ninject
yes
Inversion of Control
And how does that work
If you know
say you have 3 projects: one with your UI, another with the business logic, and another for data access
02:37
which one depends on which?
in reverse chronological order ? I'm not sure
if the UI runs the show, it's going to have a dependency on both the business logic and the data access
Okay
i.e. spaghetti
@Mat'sMug Some also use SQL :\
02:38
haha
no
say you have a "Save" button on your UI. What happens when the user clicks it?
It saves a file
a click event handler runs
Oh yes
what's in that handler?
code that calls into the data access layer right?
or code that calls into the business logic, which calls into the data access layer
I'm not sure I feel lost now
02:41
the dependencies go UI > Business > DAL
IoC inverts that
tell, don't ask
^^ like that!
All this talk about spaghetti is making me hungry... anyone have some PHPasta?
haha
02:43
say the UI doesn't have any dependencies
the click handler wouldn't be referencing the business layer anymore
instead, it would define an interface, and call into that.
the business layer would reference the UI project, and implement that interface
...
:24556940 $1million question
^^
I'd be tempted to say "not enough of them"
I'd venture an #ItDepends
But also, what Mug says
02:46
so the click handler works off some ISaveService which define whichever operations the UI needs to carry out
and then the business layer implements that interface
and it says "I need to send that to a database"
so it defines some IRepository interface
that the data access layer implements
now the dependencies look like UI < Business < DAL
tada, inversion of control
That is cool
Just succumb to the data and let it rule your life application.
02:50
@june1992 I cannot recommend this book enough: Dependency Injection in .NET
it covers it all
Would I have enough with chapter one or chapter four
and
the whole first half of the book is priceless
second half covers a catalogue of IoC containers, and how to implement DI in various paradigms
...come to think of it, the whole book is priceless ;-)
chapters 1 & 4 (the free downloads) certainly can't hurt
03:13
@june1992 I forgot one thing
these inverted dependencies cause a problem: you're sitting with decoupled components, and no way of getting anything to run!
this is where the composition root comes into play
another component, that knows about the UI, the Business and the DAL
that's where your entry point is
And I seem to understand this a bit clearer. So DI is like a socket and the socket is the interface and we can connect different connections to that socket meaning different instances of an interface by using dependency injection right. I mean I don't explain it will but the whole socket thing explains it completely
if you want, yeah - that's exactly how Mark Seemann puts it in chapter 1 with the hairdryer example
That seems really clear
03:15
I just figured it was like passing variables into a method, only you are passing them into a class.
Well you are actually passing in a Interface as the parameter but when a new instance is made of that class with the DI the new instance reference is the dependency to inject
from what I understood @Mat'sMug is that correct
yes!
s/instance/implementation
wait what is s
lol, just a notation we use here, to say "replace"
s/"replace"/"substitute"
s/"it's late"/"it's after 23:00"/
03:21
in other words..
now => time late;
so, you use this "composition root" to compose the application, by newing up the dependencies, and injecting them.
for smaller applications, you don't need an IoC container - you can do that manually
You can even do it manually for larger applications.
It is harder, though.
@Mat'sMug BTW, did you ever get the IoC working on RD?
Ever solve the problem with things not being disposed of?
you can, but at one point it gets very tedious
IoC is working on Rubberduck
there's just a few things to fix
Great, remember that issue where things weren't being disposed of because of the lifetime setting?
Ever get that fixed?
03:27
I had it fixed at one point, but until all the DockableToolwindowPresenter implementations are rewritten, Excel is going to crash on exit ..at least it does in debug mode.
Excel crashing is not anything extraordinary
well.. I'd like it not to crash because of my add-in ;-)
That's noble, hope it works out :D
oh, it will!
03:35
It seems very fitting for a question with a title that starts with "(opinion)" to be closed as opinion-based.
4
lol. where's that?
-4
Q: (opinion) Proper use of decltype

MattWhat is the proper use for decltype in type abstraction? For example, for member types, I prefer to define their type in the class as their type (int, std::string, some class), and then use decltype on all methods that interact with that data. e.g. For a user class with an email attribute, I'd...

> TAKE THIS OFF HOLD MODS
-1
Q: In what format to write a bootloader?

mosesturnerOk this is what I wrote before and people are mad about: I am amateurly making an operating system. For what I'm doing, I couldn't use GRUB as my bootloader so I need to know how to turn assembly into something a computer can understand with no bootloader? Edit 1: Let me try again. I need to kno...

Not sure if that should be re-opened or not.
@Hosch250 select lower(your_message);
03:40
@Phrancis Not my message.
missing "!!!!!!!!!"
@Hosch250 Sorry bro...
Found that in the Whiteboard ^
And this:
in The Whiteboard, 9 hours ago, by MichaelT
30k power suggestion: rub it in. Cast additional down votes on deleted questions.
28
Q: Please let me kick a bad post when it's down

Monica CellioOn sites where I either have 10k rep or am a moderator, I'll sometimes see a clearly-bad post -- incoherent, not even remotely an answer, etc -- that's already been deleted. So yay for the immediate problem being fixed, but not all deleted posts get downvoted first, and sometimes deleted posts g...

Look for a bigint implementation. Here's a C example. codereview.stackexchange.com/questions/20783/…Bill Ravdin 38 secs ago
@Hosch250 but what's the point? We can't do sh** about it
03:48
Can't do s* about what?
Well, stuff being DV on programmers
Well, we can help, anyway...
I do.
@Hosch250 ooh yes I like that
(and that's how you make a MSE title)
I'm actually quite savage over there: 74 up to 281 down.
0
Q: PHP Email Form Redirect Showing Blank Page

Valerie SharpWhen I click on the submit form I get directed to a blank page. Once I click on the submit button, I should stay on the same page and they only difference is I should see a thank you message. <?php if ($_SERVER['REQUEST_METHOD'] == "POST") { $firstName = $_POST['inputFirstName']; $lastName = $...

03:53
And I just need 105 rep to get 1.1k. Maybe in a couple days.
Ooh, a PHP question - I should answer it!
@Hosch250 all yours!
Good grief :| have fun @Hosch250
LOL, I don't know PHP, and I have to go to bed.
...except it's not clear whether it works as intended, at least from the wording
Also sounds broken
03:54
Sounds incomplete: "// TODO: Send email"
Is ".... " a valid PHP function?
VTC'd as stub code.
beat me by a second
> Does it work as intended? In that case I'd suggest to reword the post a bit to make it clearer.
Could also be closed as broken.
".... " is not a valid function in any language
@Hosch250 it's not necessarily needed to make the post on-topic
Except maybe BF
03:56
LOL!
@Phrancis That only has three dots, mine has four dots and a space.
@Hosch250 is ezy
@Hosch250 huh? ;)
This happened just blocks from our house - we walk past the place fairly often: ksfy.com/news/minnesotaandiowa/headlines/…
BTW, Jud Marshall is running for mayor, as is Bill Coleman (facebook.com/Bill-Coleman-for-Mayor-155478761451201/timeline), and our old neighbor and fire chief Tod Rogers (our candidate).
Maybe we need more guillotines.
(Not serious.)
Enough politics please
04:01
Night.
'night!
later
haha the alt text is awesome (as always)
0
Q: Dialog is difficult... why isn't there a linting tool?

Kai HendryI think this site needs a lot more work for it to become a good open-source code review platform. Otherwise, it will be blind-sided by something else soon enough! My biggest bug bears are: No sane way to integrate with jsfiddle/jsbin. Dialog is really really hard. No integration of linting t...

04:16
@StackExchange what the
0
A: Dialog is difficult... why isn't there a linting tool?

Mat's Mug I think this site needs a lot more work for it to become a good open-source code review platform. Funny you mention, out of the 112 questions I have asked on this site, 26 are tagged rubberduck - an open-source project... and I'm not done yet. I've seen a number of alternatives, and honestl...

nice
04:44
Is SE running slowly for anyone else? I can hardly load a page without reloading it at least once.
nope
can anyone make sense out of this comment?
I meant a good code review platform for open source code. Stack Snipper IIUC is for running code on the page. That's kinda useless. You need HTML/JS/CSS. You need history. In my opinion the iterations must be captured somehow. Each discussion, each refinement needs to be displayed as a story. Not buried in a chat. Code review is a lot about linting. Would be nice if there way a straight forward way of extracting a code snippet (raw URL) to be posted to an external linting tool. — Kai Hendry 6 mins ago
I don't understand. On one hand you're saying you want jsfiddle integration, on the other you're saying running the code is useless. Color me confused. — Mat's Mug ♦ 4 mins ago
Nope
You should post the question on codereview.stackexchange.com, not on SO. — Renzo 34 secs ago
05:28
0
Q: Binary Tree display

Jack PI am trying to store same letter to same node. For example: Like say I have person, people is sent to put into a node. This will create two node. I want to some thing like P: Person People see Person and people are on same node But if I run this code it broke in VS void Tree::insert(TreeNode *&

05:45
Monking
06:25
possible answer invalidation by William Jockusch on question by William Jockusch: codereview.stackexchange.com/posts/106711/revisions
@Duga problem solved
06:40
No, if the code works, but you think it can/should be optimized, repost the working code on codereview and ask for help there. — Lasse V. Karlsen 46 secs ago
Zak
Zak
Morning @all
possible answer invalidation by cr_oag on question by cr_oag: codereview.stackexchange.com/posts/106773/revisions
monking @all
06:59
@soegaard I wrote a first cut of a define-sequence-syntax version. I'm a total noob at this, though, so I welcome any critique you have! (Actually, I should post this to Code Review Stack Exchange and see what feedback I get. :-P) — Chris Jester-Young ♦ 39 secs ago
07:13
0
Q: `in-iterate` sequence generator in Racket

Chris Jester-Youngin-iterate is a sequence generator that takes a function and an initial value, and the return value of invoking the function on the current value is used as the subsequent value. For example, (in-iterate add1 0) returns the sequence (0 1 2 3 4 ...). Recently, soegaard challenged me to write a de...

07:30
0
Q: Thread safe log class which creates log files according to the current date when entry was added

user300224From this question and some help I created a thread safe logging class on which the name of the log file is same as the current date (short date) when the log entry was added. e.g. If I create ten entries today say they will all get written to log file named "07.10.2015.txt". I want to use this c...

0
Q: Customize data types in a generated model with hibernate

KaidjinI have a Spring/Hibernate application with the following domain class (irrelevant code stripped for brevity): @Entity @Data public class Program implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long tid; @Column @Convert(converter = Prog...

0
Q: Automated + human code-review process

mhtsbtI'm currently looking for a way to do both automated and human code-reviews. My ideal flow would be the following: Developers code features separate from the validated-code When developer is ready, he/she marks feature as complete in our issue-tracker Developer checks-in the code An automated...

Morning
@StackOverflow no code, probably belongs on programmers
Unfortunately this question is off-topic for CodeReview - it might be better suited on Programmers. May I suggest that you also look into a linter, possibly, depending on your language? If you're using C#, StyleCop and Resharper will do this for you. Remember to also treat all warnings as errors :-) — A Red Herring 10 secs ago
Unfortunately this question is off-topic for CodeReview - it might be better suited on Programmers (don't cross-post it - if it is a good fit, one of our moderators will migrate for you. They're all asleep now, though..) May I suggest that you also look into a linter, possibly, depending on your language? If you're using C#, StyleCop and Resharper will do this for you. Remember to also treat all warnings as errors :-) — A Red Herring 51 secs ago
hey @ARedHerring shouldn't it be is off-topic for StackOverflow ?
07:40
LOL...
deleted
Thanks @Heslacher... it appears I'm not awake enough yet

« first day (886 days earlier)      last day (3429 days later) »