« first day (443 days earlier)      last day (3575 days later) » 

12:21 AM
I notice lots of top questions about reviewing code samples that failed to get people a job, and I wonder: Would it be ethical to have code reviewed here before submission to a potential employer if not strictly prohibited?
 
Ethical for the questioner or the asker?
Actually, either way, I think it's okay.
 
The asker
 
Same if it were homework you were asking about before turning in to be graded.
 
It's utilizing an available tool, so, I'll accept that
 
Zombie down!
0
A: Simple event mediator

Alex LI think this is a very clean looking code base, so congrats getting that down. I also think that the the way you implemented the pattern worked out very well. I don't have much to say, it's mostly just formatting. Throughout, you insist on keeping block sections condensed to one line. It's per...

 
12:24 AM
I've never been gotten on to for searching SO for help at work.
The only thing that would be unethical would be posting code that you don't have the right to post.
Code that you wrote but your company owns, etc.
 
Oh, hey there @jt0dd! It's sweet to see you interested in the site
 
Darn, not much activity today. Maybe I can still flesh out (hehe) one more zombie before 15K.
2
 
Zombies puns
 
@AlexL thanks, yeah well, I figure I should invest in this. It's a valuable tool.
 
It really wasn't intended. :-)
Oh, and it turned out that I was a day too early for the first zombie, so no Revival badge. Oh well.
 
12:29 AM
@jt0dd It is indeed
 
@jt0dd Nice answers!
 
Thanks. What languages are you guys into
/ Projects
 
C, C++, Java, and assembly.
 
cool, cool.
 
Web dev, mostly PHP
Not a big JS fan
 
12:32 AM
You should try JavaScript. It's the future.
Well, I used some PHP, but since I can use JS for server and client side..
 
0
A: In 2014, how quickly, on average, are questions of popular languages answered on Code Review?

nhgrifThis started as a comment to rolfl's answer in response to jt0dd's comment: Your question from 'over a week ago' (June 30'th) was answered. Why you say it was not, is a mystery. That answer begins with: This answer is not a full review, but just a minor tweak. But the comment was quickly gr...

 
I've had my fair share of it! Not a fan yet
 
To each man his own.
 
Maybe it's because I haven't found a good JS IDE yet
I'd like to find an Eclipse for JS and HTML
That works as well as Eclipse works with Java....
 
JS was actually my very first language, but I don't remember any of it. Web development doesn't seem like my cup of tea anyway.
 
12:39 AM
Oh Alex, got ya covered
Found a great IDE for JS (/PHP, web, etc) yesterday
~ Cost of Nada, none, free.
 
Ha used that for a while, didn't like it
It was buggy and I felt, incomplete
 
Lately? Looks nice, haven't noticed bugs yet. We'll see. I found it pretty extensive
 
Yeah switche dover to NetBeans about a month ago
 
@nhgrif I agree with: Realistically, the argument you actually seem to be making is that we should probably be more aggressively closing questions as being Too Broad. We should probably be encouraging askers to narrow the scope of their questions down to a single class as a starting point.
@AlexL I didn't like the sound of it, so I didn't bother
 
1
Q: Simple AngularJS controller for REST API

ChrisWueWe record software builds from our build machine into a database and for practice purposes I'm building a little web dashboard for it. The API is REST (WebApi) and provides access to query for Products, Branches, Profiles and specific Builds. The controller queries all products (each product co...

 
1:13 AM
Hey, all.
 
Hey!
 
hey
 
I was thinking I'd just toss out a few superficial comments, but actually found a rather obscure bug.
 
nice
 
Unfortunately, you're a day too early to earn Revival. :-/ Funny thing is, I did the same thing!
 
1:15 AM
Pretty unusual to find in @JerryCoffin's code.
@Jamal Oh, I don't much care about badges. :)
 
But they're so shiny! :P
 
Next time.
I usually just fool around with code here when I have the chance and otherwise not.
It's like doing the Sudoku or crossword puzzle in the newspaper.
@Jamal: so how's the JAVA going?
 
It's going okay. :-) Two questions so far, and I have given one review using some of my knowledge. I'm not quite sure what my next program should be.
 
I have only done a few real programs with Java. Mostly the choice to use Java was either driven by 1) needing to use a Java-centric API or 2) creating a quick-and-dirty cross-platform UI.
Mostly, I find that other tools are a better fit for most purposes.
 
I just wanna make a Minecraft game. :-)
 
1:21 AM
You should write it in Erlang.
 
ah Minecraft. I think I did that at uni in java :)
 
I'm just kidding. I don't think I'm quite ready to grasp game development anyway.
 
was fun
 
Game development is a skill I never really developed.
I was always more of a physical pinball machine guy than vidiot. :)
 
I'm just looking into anything related to software. Maybe game development will come to me one day.
 
1:32 AM
I'd love to be a game developer. but also heard it's not as glorious as it sounds....
 
I enjoyed fooling around with the graphics of the Engine screensaver some years ago: jwz.org/xscreensaver/screenshots
Just not really a game.
 
@dreza I do hear some disadvantages, such as frequent layoffs and crunch time.
 
@Jamal and sleeping under your desk for weeks
 
:-(
 
not me, a friend of mine
 
1:34 AM
@Jamal Yes, I have some acquaintances who have done that kind of work and have found it to be either really, really great or a total soul-draining experience.
 
@Edward sounds like programming in general :)
 
@dreza Probably true, but the extremes seem more extreme in game development.
 
@Edward true
 
Well, I am quite used to spending hours at my computer with piles of food trash. I guess I'm getting there slowly.
 
I find the graphics work interesting, but not the game part.
 
1:38 AM
I may take game development as a CS elective next year, but that hasn't been decided yet.
 
My girlfriend has downloaded Netbeans and decided to start learning Java.
She has no programming experience.
 
@Jamal As a course, I think it would be valuable even if you don't decide to do game dev for a living.
"Gamification" is a horrible term, but the underlying idea is probably promising.
 
The semester after this next one may be entirely CS (and maybe fencing and natural science).
 
Couldn't someone at Lowe's or Home Depot tell you how to put a fence around your yard? Why would you take a class for that?
That's sarcasm by the way...
 
Surely it's not that harder than operating systems, and I've heard some troubling things about that course.
 
1:42 AM
@nhgrif Consider yourself run through with a virtual épée...
 
Nah, fencing with swords is way cooler. :-)
 
1:58 AM
@Jamal regarding that Regex question... The OP has a... different hobby.
Here's a programming language he has made: docs.google.com/document/d/…
Now it's slightly harder to take him seriously
 
Ponies!!!
 
I guess it's impressive he made it, but the theme is just so distracting!!
 
0
Q: Moving a rover, any improvements?

Vladimir PutinI made a little text based game where you move a rover and it gives you the current coordinates. You can essentially move around a 1000x1000 grid, and get output into stdout on what your coordinates are. I'm simply wondering if I could improve anything. # Rover moving program from random import ...

 
From the docs:
A class must be ended by the text “Your faithful student, ”, followed by the programmer’s name, followed by punctuation.
 
He was smoking the documentation @AlexL.
 
2:03 AM
I wonder what the compiler is like...
 
It's pink and shiny
 
@Jamal Yea ponies are out sourced in a foreign country to interpret the "code"
 
Pink and shiny is what all compilers secretly hope to be.
 
I suppose someone will say that it's still better than PHP.
 
How do you put something like this on a resume?
 
2:05 AM
Little known fact: PHP stands for "Pretty Homely Pony"
3
 
Of course they will
@Jamal I have a feeling it's Java, because all his examples have java-counterparts, which makes me think he knows Java
 
@AlexL You say that you're trying to introduce (magical) friendship to programmers and code worldwide.
 
Java is a gateway drug to... you know... ponies.
5
 
It's possible that it's JAVA. Maybe. Idk.
I'm still kinda feeling "wtf did I just read?"
 
If it's JAVA, it would lead to PONIES, I suppose.
Not that there's anything wrong with that.
 
2:10 AM
True^. Must not be JAVA then.
 
Pretty Obfuscated Non Identifiable Esoteric Syntax?
 
@ckuhn203 You too?
 
Why am I on my phone? There are many stars to be applied.
I can't unsee this stuff @AlexL.
Posting the link to my wife's fb wall right now...
 
@ckuhn203 I'm going to forever remember it too. Someone might say, "That's as crazy as a programming language made around ponies!" I would simply nod my head...
He'll appreciate the publicity
 
Still, ponies are a more sensible basis for a programming language than APL.
 
2:17 AM
Screw it. I'm just gonna start writing everything in INTERCAL.
 
@ckuhn203 If you can write an INTERCAL to PONY translator, I'm sure you'll be the next Bill Gates.
 
`Please Do Dear Princess Celestia
 
@Edward Most likely, I also heard there's a huge demand for that!!
 
@AlexL You can't just listen to focus groups. You have to create the demand!
 
Now you sound like Steve Jobs.
I'm heading to bed, but I'll just leave this insanity here. catb.org/esr/intercal/ick.htm
 
2:23 AM
Ah, but the insanity will haunt your dreams. That's the nature of computer work.
G'night
 
Later @ckuhn203, know that world is better with this new language!
Eek, just got logged out
 
At least it's not an anti-OOP paradigm...
 
anyone else had the misfortune opportunity to work with the openxml sdk?
 
Can't even spell openlmx.
 
i think it's spelled "omgwtf"
2
 
2:41 AM
0
Q: Pattern tokenization program V1

andrew4 down vote favorite I am writing this program to try and get some practice at C++ and correct and proper styling. This code is meant to take user input from a pip and then run it through the program. The user enters a pattern and that pattern is turned into a regular expression which is compar...

 
2:59 AM
hi!
 
0 downvote favorite
 
@Jamal I figured it didn't even need super-ninja-search as I hit [ENTER] ;)
 
All this time, I thought it had to do with the OP assuming that the question can attract downvotes.
SO still has some recent questions, but they're mostly crap: stackoverflow.com/search?q=%22down+vote+favorite%22
 
what I wonder is ... why
why would one paste a question
 
So many questions indeed. I also ask why some people upvote non-answers.
 
3:11 AM
I think I salvaged this one:
4
Q: Good practice for client code to MVC WebApi service

PEKI have written a very simple web service with MVC and WebApi. Now I'm working on the client code which will be a WPF application (and soon Windows 8 Store/Phone app). What I have done works, but I'm not sure I'm doing it the "right" way. The purpose of the service is to check if there are any new...

seriously, why hasn't it been closed?
 
@ckuhn203 check this out -- codereview.stackexchange.com/a/57509/9520
ugh why does it let me ping people who aren't here
 
lol
hey @DaggNabbit
 
hey @Mat'sMug
 
    public CheckVersionResult CheckVersion(string product, string platform, string version)
    {
        CheckVersionResult result = new CheckVersionResult();

        //Logic removed...

        return result;
    }
@Jamal 15K?
 
3:31 AM
@Mat'sMug On SO, I mean. I saw a "thank you" answer upvoted today.
checks top of screen :O
I hope that's not going to get reversed.
 
I have only 1 vote left to spend.. had some catching-up to do :)
 
I guess it's too late to reverse some of them for now?
 
I meant, they won't be reversed. Some users earned +20, +30 in the process too. Santa never gives all the toys to a single kid.
@Simon busted 19.5K, for instance ;)
 
@Mat'sMug The system also takes that into account? I never knew that.
 
3:46 AM
I think it only accounts for consecutive votes for the same user's posts within a limited amount of time
besides, it makes me see C++ code, and I get to upvote Loki's nice answers! :)
 
Oh, good. Well, it's nice that you're upvoting others, too. :-) Now I'm just 2 rep short, but it'll come in time.
 
just suggest an edit nevermind.
@Jamal Santa sprinkles joy everywhere
 
I can ask a question.
 
you'll get a +5 before you can get a +2 for accepting ;)
 
True. I'm not trying to get a solid 15K anyway.
 
3:51 AM
I hope to get to 20K @000. For the picture, you know?
@Jamal this guy reminds me of when I started on CR and wrote the t-shirt post:
7
Q: I bet you didn't know about this comment by Jeff Atwood on Code Review's viability

jt0ddI just stumbled across a comment on Code Review by Jeff Atwood I just stumbled across a comment on Code Review by Jeff Atwood that only 2 people other than me seem to have noticed (and known the significance of the owner). Beyond wanting to point out that fun-fact that the inventor of Stack Ex...

 
I actually did miss that comment. Sort of a weird premise for a post, but it did spark some good discussion.
 
> This site has reached it's full beta potential. Sure, there are always improvements to be made within the community, but why dampen this site's potential by keeping it in beta any longer?
I think that's starting to become a very good question ^^
not sure about the premise though
what's left for us to accomplish in our beta phase?
> It makes more sense to let this site to continue to grow with it's own design, and all of the advantages of graduation. The people here deserve it.
I wonder when our next review is. Can't wait 'till November!
ugh. I hate when that happens.
3
Q: Binary addition with strings

Leopold AspergerThe following method will add two strings of any length as binary numbers assuming the characters 1 and 0. I made this for fun in my spare time. Improvements are not critical but I would like to hear them. I would also like to know if there is a more efficient algorithm to simulate a ALU. stati...

anyway.. TTGTB
good night!
 
Goodnight!
 
4:28 AM
0
Q: Returning factorials greater than 12

RDSpinzI have the following code, and I want it to give me factorial values up to 20. -(NSUInteger)factorialofNumber(NSUInteger n){ static NSUInteger f[N + 1]; static NSUInteger i = 0; if (i == 0) { f[0] = 1; i = 1; } while (i <= n) { f[i] = i * f[i - 1]; i++; } return f[n]; } The iss...

 
thanks, santa :)
 
:-)
 
5:04 AM
what is this codereview.stackexchange.com/questions/43770/… and why does it look so cool?
 
5:17 AM
1
Q: Git commit-msg URL shortener

JamesWatlingI have just written my first git hook script. It is very simple that simply finds any URLs in the commit message and uses the Google URL shortener to rewrite the URL nicely. it is located here. I feel it could be improved immensely (as it is my first) and would love to have your input. #! /bi...

 
 
1 hour later…
6:37 AM
Monking
 
6:48 AM
Monking
 
0
Q: Ugly Numbers: A Rags-to-Riches Story

mjolkaI stumbled upon an unaswered question, which looked like a good fit for a functional programming language. Here is the problem statement from codeeval: UGLY NUMBERS CHALLENGE DESCRIPTION: Credits: This challenge has appeared in a google competition before. Once upon a time in...

 
Internationalized GUIs look like quite a chore.
 
7:12 AM
@skiwi especially when you seem to actually need to change the template for each friggin language..
 
@Vogel612 How do you mean?
That part should be covered.
 
currentLocale = en_US
At 10:16 AM on July 31, 2009, we detected 7
spaceships on the planet Mars.
currentLocale = de_DE
Um 10:16 am 31. Juli 2009 haben wir 7 Raumschiffe
auf dem Planeten Mars entdeckt.
At {time, short} on {date, short} ...
 
Same template, but different implementation pe rlanguage
 
vs: Um {time, short} am {date, short} ...
 
But you'll always need to translate the resource strings/templates
 
7:15 AM
meh. what a hassle.
 
Any clue why this does not work?
Pattern errorMessagePattern = Pattern.compile("^\\{\\w*\\}(\\d+) is not a standard Code value$");
String exceptionMessage = "{w3.org/2003/05/soap-envelope}406 is not a standard Code value";
regexr.com is awesome though
Oh...
\\w* does not match : for example, I needed \\.*
Huh, one hour passed already?
I wish I would've written documentation earlier... Then I would still know how my program worked.
3
 
7:35 AM
isn't \\w just whitespace-characters?
[_ \r\n]??
 
@Vogel612 It's [a-zA-Z0-9_] or similiarish
 
oh..
i knew there was something with underscore.
 
7:49 AM
What do you do if, after posting a question, you immediately see a way to improve the code?
 
An utmost interesting bug here. I have a Start button that turns into Stop once it's started and vica versa. After a sequence of operations, when I press start is immediatly stops, twice, and the third time it works.
@mjolka Depends how big the change is and how it is after you posted
 
@mjolka if there was no answer yet, edit,..
at least that's how I do it.
alternatively wait for an answer, if nobody addresses it, post a selfie
 
Oh FACEPALM, I forgot to copy over a file.
 
@skiwi gz, nice bugreport...
 
I don't feel great about changing the code, just in case someone is working on a review
Might just leave it a day
 
7:55 AM
Note to self: I am an idiot.
2
Ugh, at least I fixed the majority of the bugs! (None were a real showstopper anyways)
java.lang.RuntimeException: java.lang.RuntimeException: org.im4java.core.CommandException: org.im4java.core.CommandException: convert.exe: WriteBlob Failed -' @ error/png.c/MagickPNGErrorHandler/1804.`
Huh, why are those exceptions double wrapped? lol
 
> none were a real showstopper anyways
"or maybe the code below shouldn't happen in the first place." - probably yes, but we can't say concerning that, as you have given only that code, isolated from the context. This makes an actual review of the code at hand in the full context (useful / sane or not) impossible. Your edit does not actually make the purpose of the code any clearer. Voting to leave closed. More info in this meta-post esp: "The excerpt is hypothetical in nature" — Vogel612 25 secs ago
 
8:29 AM
11 more Upvotes until -bronze
 
9:14 AM
my remote desktop connection is randomly replacing single mouse clicks with double clicks...
 
9:37 AM
I had to laugh a bit after reading this code which I wrote a while ago
public static void moveToManual(final Path manualDirectory, final Path directory) {
    Logger idLogger = LogManager.getLogger(directory.getFileName());
    try {
        idLogger.info("Automatic failure detected, moving for manual recovery.");
        FileUtils.move(directory, manualDirectory, directory.getFileName().toString());
    }
    catch (Exception ex) {
        //TODO bad stuff, file is lost
        idLogger.fatal("File {} is stuck.", directory.getFileName());
    }
}
//TODO bad stuff, file is lost ...
 
0
Q: error in a while loop

ClaraI'm trying to read a file and put the information in a matrix, but I'm getting a syntax error: syntax error at perl.pl line 12, near "){" syntax error at perl.pl line 16, near "}" Thanks! #!/usr/bin/perl –w use strict; my $coord="prova.txt"; my @coord=llegirarxiu($coord); sub llegirarxiu{ ...

 
10:11 AM
@CaptainObvious OT - Kill it with fire
2
 
@Vogel612 I'm out of fire. How about a close vote instead?
 
@SimonAndréForsberg already applied
 
Same here :)
 
Also upvoted your auto-comment FWIW
 
0
Q: Seems like a bad way of doing things JS Function

Josh Kirkpatricki have a JavaScript function that is getting data out of a JSON file and then doing some formatting to it, the code works but i feel like it just an awful way of doing it, all criticism and help appreciated function MCScrap(ZWA, ZWB, ZWC, ZWD, Number) { $(document).ready( function() { ...

 
11:07 AM
The last message was posted 1 hour ago
 
The last message was posted by Vogel612
 
Made myself a Trello board for my app's development
I'm feeling pretty indie right now
 
@JeroenVannevel Trello board?
 
@SimonAndréForsberg Trello is sth similar to JIRA, developed by ....
Joel Spolsky and his company IIRC
 
11:20 AM
heh...
static NSUInteger i = 0;
if (i == 0)
 
Yeah, project management really
Where I work we use Jira to create tickets and document the flow
and Trello for sprint planning
it's set up in 20 seconds and has an android app
beats the TODO list app that I used before that
 
îs it just me or are MovieDBs popular??
 
0
Q: WhenAll for .NET 3.5

Ned StoyanovI am trying to write a version of Task.WhenAll for .NET 3.5 using the "Task Parallel Library for .NET 3.5". This is what I came up with. Is there a better way of doing this? public static Task WhenAll(IEnumerable<Task> tasks) { var tcs = new TaskCompletionSource<object>(); ...

 
Oh my notes are so usefull....
"something can be null"
That was literally a note, ffs.
 
Nevermind bout the repo's, generaly you are right. But this doesnt mean: "Just use EF wherever you want". You still gotta be smart where you use the context. And that's the bad part, people start using it everywhere... But you've convinced me, kudo's for that :-) Upvoted, but I hope people be aware about EF entities shouldn't be used on the presentation side. I've seen EF Entities with MVC annotations, that realy hurt the eyes. — Frederik P. 13 mins ago
This is going to be a nice day :)
3
Monking!
 
11:38 AM
Monking @Mat'sMug
 
Monking @Mat'sMug and mug
 
I never really realized how indecent Inner circle - sweat (a lalalala long)'s lyrics are
 
0
Q: Database revision needed for sports events database

Brendan VogtThis is not a code review but more of a database schema review. I have a sports events website that I am doing in my spare time. I need assistance with the database design. I am about 80% completed. It sounds simple, but it’s more than just the event name and start and end dates. Let me give yo...

 
Huh
Caused by: java.io.UncheckedIOException: java.io.IOException: unexpected exception type
	at dpc2.base.utils.FileUtils.readSerializableObjectFromFile(FileUtils.java:123) ~[DPC2Base.jar:?]
 
wow you wrapped your RuntimeException in another RuntimeException... congrats...
 
11:44 AM
What on earth is that stacktrace?!
 
You read too much
 
what that's not your standard?
 
It better not be another Java bug.
Ah, found the root cause
Caused by: java.io.EOFException
	at javax.imageio.stream.ImageInputStreamImpl.readByte(Unknown Source) ~[?:1.8.0_05]
	at com.sun.imageio.plugins.wbmp.WBMPImageReader.readHeader(Unknown Source) ~[?:1.8.0_05]
	at com.sun.imageio.plugins.wbmp.WBMPImageReader.read(Unknown Source) ~[?:1.8.0_05]
	at javax.imageio.ImageIO.read(Unknown Source) ~[?:1.8.0_05]
	at javax.imageio.ImageIO.read(Unknown Source) ~[?:1.8.0_05]
	at com.skiwi.tessutils4j.data.ImageHelper.bytesToBufferedImage(ImageHelper.java:30) ~[TessUtils4J.jar:?]
Still much WTF.
 
yesterday, by Simon André Forsberg
@skiwi ExceptionalExceptionException ?
@skiwi ^^
 
@CaptainObvious Database Revision Q has no code.
 
11:49 AM
Can a serialized object be broken?
Over half of the file is written with UTF-8 value ÿ
 
@skiwi sure serialized object can be broken...
 
@CaptainObvious Belongs better on DBA
 
have a bit-error when writing and everything breaks.
@SimonAndréForsberg seconding and flagged for migration
 
I flagged it as well
 
damn what a hassle...
 
11:51 AM
@Vogel612 It seems like the serialized file has somehow the exception that occurred during serialization written into it
 
@skiwi wat? you mean during serialization there was an exception and the Stacktrace got serialized into the file???
 
@Jeroen doesn't sound the same when you're 12 ;)
 
currently writing the PoC for my "final project" as trainee
 
@Mat'sMug My childhood feels so dirty now
 
@Vogel612 Scratch that, it was what I was thinking for a second.
It's was just using the readObject from a class,
So it's simply an java.io.EOFException
Now how on earth do I debug this.
It happens when I convert my byte[] back to a VufferedImage
 
11:58 AM
Have you made sure your serialized object has no errors??
 
I think I found the issue
class ImageHelper {
    private ImageHelper() {
        throw new UnsupportedOperationException();
    }

    static byte[] bufferedImageToBytes(final BufferedImage bufferedImage) {
        if (bufferedImage == null) {
            return null;
        }
        return ((DataBufferByte)bufferedImage.getData().getDataBuffer()).getData();
    }

    static BufferedImage bytesToBufferedImage(final byte[] bytes) throws IOException {
        if (bytes == null) {
            return null;
        }
        return ImageIO.read(new ByteArrayInputStream(bytes));
This isn't 100% compatible, is it?
They should be each others inverses
 
use an intermediate variable that holds the byte array from bufferedImage.getData().getDataBuffer()).getData()
breakpoint after it
copy the contents of the byte array
and call ImageIO.read(new ByteArrayInputStream(bytes)) with it
See if it works then
 
If it only were so easy... I'll consider it
 
I don't know what a DataBufferByte is though
This looks more intuitive to me
Maybe it changes some things behind the scenes
> Values stored in the byte array(s) of this DataBuffer are treated as unsigned values.
that might be important
I've serialized files to byte arrays at work and used the same technique as above to see its byte-value contents
 
It's assuming jpg there
 
12:06 PM
half of all values were negative integers
 
The trick is that it works on most images/invoices I am getting
Except on some with interesting formats
 
well shouldn't you know to what format you have to serialize back?
 
@Vogel612 If the solution worked, then no
But there is probably a reason that BufferedImage does not implement Serializable
 
question... Why not make it?
 
I think I found something
PNG is a lossless format of course
I can perhaps let it pretend it's PNG data
@Vogel612 Make what?
 
12:10 PM
SerializableBufferedImage extends BufferedImage implements Serializable {
 
@Vogel612 Because it won't make it serializable then, I think there is some object in the hierarchy not being serializable, will check though
@Vogel612 I'm not saying it is completely impossible, but most of the BufferedImage member variables are not serializable
 
That's definitely a hindrance..
 
Heh, I kept getting NRE's from some library that I added for all kinds of different user dialogs
turns out I added the wrong library
That's one way to waste time
 
YES
No regression, but progress!
Another bug squashed :)
Don't worry @JeroenVannevel, I also do stupid things
Like I was checking some requests with minimal information, while I could also just log more.
But I always get the weird exceptions!
Caused by: org.im4java.core.CommandException: convert.exe: WriteBlob Failed -' @ error/png.c/MagickPNGErrorHandler/1804.`
Last one to crush.
 
12:27 PM
0
Q: Reusability vs Simplicity

Nick UdellI have a small game I'm working on with a set of interfaces: IHavePosition: public interface IHavePosition<T> { T Position { get; set; } } ICanMove: public interface ICanMove<T> : IHavePosition<T> { IEnumerable<IMotor<T>> Motors { get; set; } } ICharacter: public inter...

 
Google to the rescue!
If this turns up in the top search results, then I'm screwed, right? pastebin.com/pfPKA5Ft
Then the author somewhere...
"Please read the documentation, all details are available." No, it's not!
 
try removing the spaces...
 
@skiwi Why not use ImageIO.write for writing it to bytes?
 
@SimonAndréForsberg That's exactly what I am doing now :)
 
@CaptainObvious Seems more like a design review
 
12:40 PM
I'm going to test it now directly on the CLI.
I'm going to be pissed if it does work on the CLI, and I am going to be pissed if it does not work on the CLI.
 
@skiwi why bother then??
 
@Vogel612 Because it might give hints, and it did.
Turns out that it is a 2-page TIFF file
Thus it generates two outputs, but I was reading only one.
Or it was trying to convert two outputs in one image, either way, bad stuff.
 
@Jamal Doesn't necessarily make it off-topic AFAIK/IMO.
 
Which is why I didn't close it myself.
 
@rolfl did, however.
 
12:51 PM
Hmmmm.....
 
Well, at least I barely started my answer
 
Monking.
 
all I wrote was "I'll throw out some ideas I have for how you can "solve" this, and then you will have to decide which way to go."
Monking @rolfl
 
I have done that a few times, with marginal questions and given answers that prove it is on-tpoic enough.
 
In my opinion, interfaces can be real code.
 
12:53 PM
Prove me wrong ;-)
 
And design questions are not generally off-topic as long as an existing design exists already.
Alright, I will, I'm writing up an answer
 
My options here are getting an error or getting deadlock.
 

« first day (443 days earlier)      last day (3575 days later) »