« first day (781 days earlier)      last day (3240 days later) » 

3:00 AM
(Guava is not that bad, just not always needed, and I was never allowed to use it (IBM things)). Lombok just irritates me... sorry.
 
I consider Lombok to be way more useful that all the Java 8 stuff. Actually, all uses of Java 8 I've seen so far were obfuscations.
 
Out of curiosity:
30 mins ago, by QPaysTaxes
Would porting to C/C++ have any noticeable impact on the speed?
 
Hello
 
Would porting your Ruby to C/C++ have an impact on the speed?
 
Aww. Nobody wanted to say hi. :(
 
3:05 AM
I wanted, but I forgot. :D Hi!
 
Wow. The Internet is crap here. Lemme remove on of those.
I swear, every minutes, Safari throws a timeout error
And everywhere I go, there are unprotected Wifi networks.
 
@QPaysTaxes How small are the negative numbers?
 
You're using %, which is broken by design. Use x & 255.
 
I ran into one the other day named "Robinson Family Wifi (NEIGHBORS NOT ALLOWED TO USE)"
It had no password of any kind.
I guess that's what happens when you visit South Dakota.
 
Yes, for moduli being powers of two, that's perfect.
 
3:10 AM
@QPaysTaxes May I ask something?
@QPaysTaxes Okay, here goes. Why was there an odd period of time (about a week) where you weren't coming in here, and getting annoying when we (me) pinged you from in here?
 
The problem is that % returns negative results which is hardly ever usable. Look at my mod in codereview.stackexchange.com/q/94383/14363.
 
Okay. Thank you for answering. :)
Well, I'm gonna leave now. The Wifi here is crap. I'll be back and active in here in about 4 days. Bye.
 
Bye.
@rolfl "Lombok just irritates me... sorry." - you're surely kidding, right? ;)
 
I don't kid about such things.... each to his own, but for me I prefer the boilerplate
 
The only irritating part of Lombok is that it's not part of Java.
Sure, each to its own. I didn't really believe you're kidding.
I'm trying to understand. Some advanced things may be debatable, but why the hell should I write getters???
 
3:23 AM
You shouldn't, that's what IDE's are for.
Ctrl-shift-S - add-getters.
 
@QPaysTaxes For example me. I always use it, no exceptions.
@rolfl The problem is that the code then sits there.
@QPaysTaxes You're welcome. :D:D:D
No, it's not. You need to get it just once into Eclipse and that's matter of clicking on the installer jar.
 
And then you spend a day uninstalling it.... it did not behave well in combination with my work computer.
 
Yes and no... you need it actually twice, my bad. Once to get Eclipse using it and once as a project dependency. But the second part is completely trivial.
@rolfl Spend a day uninstalling? Then you should hire me, I've just uninstalled and installed it again.
 
@maaartinus A number of things happened, but, I had an eclipse install for CR, and another one for IBM's watson. I installed lombok in what I thought was the CR eclipse but something in my workspace, or eclipse install got transferred to the other. I had to diagnose, blame and correct it. Ended up having to wipe both installs and workspaces, and then rebuild from scratch.
 
0
Q: Globally accessible helper class

jeraldoI would like to get opinion if I am doing this right. I am creating a helper class that is globally accessible to my whole project. I want it to be easily called like Facebook.LoginUser() My code is like this: class Facebook: NSObject { class func LoginUser() { println("Login user...") ...

 
3:30 AM
@QPaysTaxes No. I'm using Lombok as a project (download from github, run ant eclipse and it's there). Then I add the project. +++ But adding the jar is simple too, just project/properties/java_build_path/projects/add and use the filter for the jar selection.
 
I am not exactly blaming lombok, but, the net result is that I won't install it ever again ;-)
(famous last words, I am sure).
 
@rolfl That's pretty terrible. For me, it's just a line in eclipse.ini (plus a jar file, which is just lying around). Remove the line and it's gone. +++ I guess, there were times when this was worse. But let me restate: The problem is that Lombok is not part of Java. If it was, you'd have no such problems.
 
@maaartinus Probably, but I tend to have multiple different installs running at any one time... at work at the moment I have 3 different eclipse installs, and 5 or 6 workspaces.
 
And there are still things in Eclipse not working perfectly. And I can imagine Lombok conflicting with other tools.
 
The worst is when some things use gradle, others use maven and others are part-scala, and so on.
I now just load a different eclipse for each project.
Since I work on multiple at a time, it becomes fiddly.
 
3:35 AM
@QPaysTaxes The thing is that Lombok is actually no library. There are no runtime dependencies, so it doesn't qualify for a library. It's a tool. +++ So compare it to e.g. addblock rather than netfix.
 
flush or close the output stream?
 
I often go through the code method by method and whenever I have to skip over some getters and setters, it's distracting.
@spyr03 Assuming Java: Both. Practically close always flushes, but there's no guarantee.
 
@spyr03 Uhm, it does not make sense if you are missing the first few characters.
 
@rolfl What does IBM use instead of Guava? I'm unaware of any such publicly available library by them.
 
@maaartinus I use the term IBM liberally, Algorithmics, bought by IBM, does not use Guava.
I am sure there are folk in IBM who do use it.
Just not me.
The licensing conditions, even apache 2.0 make it harder to integrate in to for-sale products, and so on.
 
3:41 AM
I had a weird bug where I didn't close a file writer, but the file still had output from before, and since I didn't notice, I was wondering why it wasn't printing half a line.
 
IBM is a stickler for those things. Working around using it is often easier than using it.
 
I dont speak Ruby
 
@rolfl I see.
 
@QPaysTaxes I'm only a young buck, going into 3rd year in college, ruby is far away after I learn the important stuff like how to write a basic compiler and what empirical software engineering is
 
As it happens, I have been using a well-tested toolkit of 'things' for the past 10 years (probably for longer than guava existed...?) that covers my needs.
it's IBM owned, and as a result, has no issues with compliance.
 
3:45 AM
I love Guava as it has tons of useful stuff, is well optimized and tested. At the time I started using it, Apache commons has no generics...
 
@QPaysTaxes america? What age do you start college?
@QPaysTaxes ah, thats how old I was when I started coding
 
That's how old I was when the 486 came out.
 
@QPaysTaxes haha, as if, I only turned 20 a week ago.
I definitely don't compare to the years of experience in here
 
1983
 
nearly 2 years ago? so 2013
 
3:51 AM
1997 (ish)
 
Why did people get into coding?
 
Logo
 
a classmate built a text-based adventure game in qbasic, i thought it was the coolest thing ever
 
Right, time for something useful, and serious....
TTGTB
 
night
 
3:59 AM
I guess I should leave... have fun!
 
0
Q: What is up with this script? It won't work properly

elitheultimateIt is suppose to move the letter "A" around a 10x10 grid (note that this is a dungeon crawler movement engine that I'm experimenting with and it is not complete) By the way, here is the script: @title Adventure @echo off @setlocal enabledelayedexpansion goto title :title echo Adventure echo Pres...

 
4:35 AM
Oh hello @QPaysTaxes, I haven't seen you lately
oooh elections
yay (I think)
 
I've been coding in the summer since 2013.
I started C++ in summer of 2013, wrote my WPF app in summer of 2014, refactored it this winter break + sporadically in spring semester 2014/2015, working RD and a Resx localization helper now.
Hi, @QPaysTaxes.
Just popped in for a sec before I take my bath.
BBL. I'll definitely be here more if I run for Mod.
Not ruled it out yet, but I don't know if I want to.
I'm here most of the day, but I'm not super active anymore.
I've never moderated anything except the comments on my blog, and most of those are spam.
Reminds me, I should check that soon because they just disappear after a while.
Anyway, gotta leave for real.
 
Code review might be a better choice — MadProgrammer 23 secs ago
 
4:52 AM
Monking @all
 
5:20 AM
0
Q: Can't tell if I documented and named my function unambiguously

AlhadisI'm new to this side of Stack Exchange, so bear with me... I wrote a function to reduce the size of JSON objects that works simply by turning every associative array into an indexed one, and moving each property's name to the first row of the data array (ordering it a bit like a CSV file, I gues...

 
Tou had a question for me?
 
@QPaysTaxes Poster is allowed to ask for special attention to be paid to some part of the source - no reason why it couldn't be the documentation. Answers however are not limited to what the asker requested.
Usually it's something like performance, or some narrow part of the code.
I just realized that I need to use a technique that I last used 15 years ago.
Most streams, the using object reads from the stream - which could also be called a pulled stream. But there is a circumstance where it's useful to flip everything around and use push streams, where the stream writes the output to the using objects.
The object that is using the data from the stream.
At 0130, very little is as obvious as it should be.
2
 
5:38 AM
@QPaysTaxes Because all unrecognized characters in BF are considered comments.
That works too.In fact, it sounds simpler.
 
0
Q: Getting the user's IP

gsagoalCan you please tell me whether this is a good way to get the user's IP (IPv4 or IPv6)? Does someone have a better way to do this? Please take a look at the entire code, the server_params order and the comments. /* We are looking for ip in server params */ $server_params = array('HTTP_CLIENT_IP',...

 
@QPaysTaxes It's like the difference between a customer that takes money out of his pocket and hands it to the cashier, and a cashier that reaches into the customer's pocket and takes out the money. The end result is the same - cashier gets the money. However one approach just seems less weird than the other.
And for streams, normally the using object is in control and drives - pull streams.
But there is a circumstance when push streams work better. If you have a large amount of serial data and multiple destinations. Especially if there is a high latency to start the read.
 
5:59 AM
0
Q: Brainf**k to Ruby converter -- v2

QPaysTaxesPrevious iteration. You know, I think this is the fastest I've ever pushed out an update to anything. This is Version 2 of my Brainf**k to Ruby converter, and the generated code looks... Well, like Brainf**k, converted directly to Ruby, with no attempt at making it more readable. I'm looking fo...

 
I think this should be on CodeReview. — adricadar 58 secs ago
Since you have a working code, I think you should post it in the code review section. — Vaulstein 58 secs ago
 
0
Q: Better way to write this method ? SQL/C# query building

ArahIs there a better way to write this method in C#? I really want to refactor this method in order to make it more efficient, but don't know how to. This string is the body of a SELECT DISTINCT someID + selectList FROM tableName WHERE conditions query. private static string CreateQueryBody(IList<s...

 
6:34 AM
0
Q: Resizing components to fit the row

DanI am using MigLayout in my code import javax.swing.*; import java.awt.*; import net.miginfocom.swing.MigLayout; public class MCVE { JFrame myMainWindow = new JFrame("MCVE"); JPanel mcvePanel = new JPanel(); JTextField tf1 = new JTextField(); JTextField tf2 = new JTextField(); ...

 
7:11 AM
Monking
@CaptainObvious I'd say off..
 
0
Q: Java division without multiplication, addition or divison

PaulIn context of preparing for a coding interview - I gave the division problem a go using Java. This is what I came up with. It's a little bit different to other solutions I've come across the interweb. public static int division(int a, int b) { // For the basic cases if (b == 1) { return...

 
7:36 AM
I wonder whether we still get a daily bad pun...
 
0
Q: File Upload with Java - Servlets

Koray TugayHere is my code: package biz.tugay.fileUpload; /* User: koray@tugay.biz Date: 24/06/15 Time: 09:21 */ import javax.servlet.ServletException; import javax.servlet.annotation.MultipartConfig; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.h...

 
7:57 AM
0
Q: Java program to multiply two matrices.(My friend's code)

Taha NadeemThis is my friend's code and not mine. He asked me to post it on this website because he got banned from stack exchange. import java.util.Scanner; class MatrixMultiplication { public static void main(String args[]) { int m, n, p, q, sum = 0, c, d, k; Scanner in = ...

 
monking @all
 
0
Q: Recursively merge dictionaries with generic types in C#

Laurens VergoteI am looking to implement a method that is capable of merging 2 dictionaries using generics. I've seen several great answers on SO already, but none handle the case of nested dictionaries. As in, what if the value of the dictionaries is another dictionary... In order to tackle this, i created th...

 
Monking
@Vogel612 Until graduation, so he still has a couple of days.
 
8:21 AM
0
Q: Class with navigation property and with or without foreign key

LoetnLet's say I have the following classes, auto generated by Entity Framework, that have an association: public class Parent() { public int ParentID { get; set; } // PK public int ChildID { get; set; } // FK public string Description { get; set; } public Child Child { get; set; } ...

0
Q: PHP / MySQL: How to shorten email / password verification (working code)

keewee279I am new to PHP and have web page (login) where a users enters their email and password and I then need to check: if the entered email exists in the db and if the entered password matches the (hashed) one in the db. The password in the db was hashed through $pw = password_hash($_POST["pw"],...

 
I'm voting to close this question as off-topic because it is about refactoring working code, so belongs on codereview.stackexchange.comRory McCrossan 39 secs ago
 
8:49 AM
0
Q: How do I write the following JQuery functions in plain JavaScript?

Alexander HeinIm trying to build a configurator with transparent images. Right now the image configurator works over a simple JQuery function: I have given each input element a data attribute which I have called data-Image. The function catches the data-Image of a selected option and loads it on a inline style...

 
9:10 AM
I'm voting to close this question as off-topic because this question belongs to Code ReviewThomas 23 secs ago
 
0
Q: A tiny library for textual serialization of lists in Java - follow-up 3

coderoddeSee the previous iteration. I have incorporated the answer of h.j.k.. Now I have: LineStringSerializationFactory.java: package net.coderodde.lists.serial; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Scanner; /** * This class contains stati...

 
From the help page What types of questions should I avoid asking? "You should only ask practical, answerable questions based on actual problems that you face." Your question is not a problem, it's a Code ReviewThomas 1 min ago
 
9:26 AM
The bots are having fun.
 
9:54 AM
0
Q: Saving nested JSON to db, inferring order and record deletion

KickimusButticusI'm a ruby noobie. I've written a method for an api call that updates a store menu. It takes JSON as input, in the following format: { "menu" : { "item_groups" : [ { "id" : "1", "name" : "Drinks", "items" : [ ...

 
10:19 AM
Monking
How do you guys deal with if creating a new project is blocked by not being to have a decent name for it?
 
@skiwi Think of a decent name.
 
@skiwi Shift + F6. (Rename)
 
When in doubt, grab one of the most prominent class names.
 
Name it anything at first, rename it later. I've had several of such projects.
 
@Mast I haven't made anything yet :(
 
10:31 AM
@skiwi What's it supposed to do? Grab that as Name In Progress
Change it later if required.
 
@Mast Simple inventory management right now, might be extended to simple accountancy later
 
First try at such a thing or can you incorporate existing code?
 
First try
 
If the former: InventoryManagementScrapbook
 
If I can get this thing done (and I've got some people wanting to use it already), then it would be good for my CV as well
And general project building skills, etc.
Maintenance
lol...
2
A: Division without multiplication, addition or divison

rolflI typically dislike questions like this... it makes no sense to add arbitrary constraints. suggesting better ways to do things is ... daft. Still, there's a few things in here: int temp = new Integer(a); WTF? What's wrong with int temp = a; ? Then, about input validation.... three things: ...

@rolfl At the moment I read the word daft, I knew it was your answers ;-)
 
10:50 AM
@skiwi I'm tempted to do it in VHDL, but my only dev-board is currently out-of-order and my current employer doesn't use it.
 
@Mast Well... if that's what you really enjoy, then why not? :)
 
Ofc, I'd make it so it takes input over UDP and outputs over 7-segment displays.
Which would take awfully long to build.
Dutch Overengineering(TM)
 
right now I think it's more a case of
 
The real problem with over-engineering is you never get anything done.
 
The real problem with over-naming is that you never get anything started.
 
10:54 AM
The real problem with over-thinking is that you never get anything named.
 
The real problem with @skiwi is that he never gets anything done
 
@SimonAndréForsberg It's sad because it's true
 
Sorry, now I'm being evil. I'll shut up now.
 
I'm just wanting to make some kind of software to assist some kind of business, and it'll most likely include parts of accountancy and inventory management
Even though I don't even know what I'm making, I want a meaningful name for it
2
 
How can you give a meaningful name for it when you don't know what you're making?
 
10:57 AM
@skiwi Working name -> Write code -> Rename project
 
right now, it sounds like the best name for it would be SKOT - Some Kind Of Tool
 
@Mast Where do I find good working names? ;)
 
I just gave you one.
 
@skiwi Make something up. I've seen big companies using names like 'Project Jaguar' for building some advanced piece of hardware.
 
10:59 AM
I could keep uploading images to gfycat and see if one of their random names is decent...
 
If you're sure you can't put a fitting name on it, make it very unfitting.
At least you'll be able to recognize it as a working name.
 

« first day (781 days earlier)      last day (3240 days later) »