Search found 270 matches

by WanderingLinguist
Fri Nov 09, 2012 3:02 pm UTC
Forum: Coding
Topic: Language Love/Hate
Replies: 80
Views: 19739

Re: Language Love/Hate

Going from ArrayList<Integer> to int[] isn't so clean. If I want to turn it into a Integer[] (an native array of Integer rather than an ArrayList) would be really easy if generics worked properly: Integer[] intArray = listOfIntegers.toArray(); Unfortunately, it ends up being this: Integer[] intArra...
by WanderingLinguist
Thu Nov 08, 2012 11:31 pm UTC
Forum: Coding
Topic: Language Love/Hate
Replies: 80
Views: 19739

Re: Language Love/Hate

Getting a an int[] from an ArrayList<Integer> is just so darned ugly the way generics work now. from Guava... List<Integer> Ints.asList(int...) Solved problem is solved. (Code to interfaces, why don'cha) Ah, I mean the opposite. Going from int[] to ArrayList<Integer> isn't a problem. Going from Arr...
by WanderingLinguist
Thu Nov 08, 2012 11:15 am UTC
Forum: Computer Science
Topic: What would you do with an infinitely fast computer?
Replies: 818
Views: 226516

Re: What would you do with an infinitely fast computer?

Ah, I got it now. Yay, terminology.
by WanderingLinguist
Thu Nov 08, 2012 11:13 am UTC
Forum: Coding
Topic: Language Love/Hate
Replies: 80
Views: 19739

Re: Language Love/Hate

For me it's Java: What's the point of forcing variables in interfaces to be final? Because there's no place to store them. An interface is just a specification. It doesn't have any state. If you wrap them then you can easily modify them so it seems a bit silly. I don't think that does what you thin...
by WanderingLinguist
Wed Nov 07, 2012 11:32 pm UTC
Forum: Computer Science
Topic: What would you do with an infinitely fast computer?
Replies: 818
Views: 226516

Re: What would you do with an infinitely fast computer?

...when it's so easy to construct them mathematically. Is it, though? All of them, I mean. If you had an infinitely fast immortal person, could that person construct all the reals? What algorithm could you use (mathematically) that would cover all the reals given an infinite amount of time? I don't...
by WanderingLinguist
Wed Nov 07, 2012 11:24 pm UTC
Forum: Coding
Topic: Help Request: Triangulation in 3D
Replies: 9
Views: 3230

Re: Help Request: Triangulation in 3D

I've got a simple case working already, where the two known points are on the y-axis (one at the origin) This really isn't my strong point, so I might be totally wrong, but couldn't you do a simple transformation to place both points on the y-axis (and the unknown point off the y-axis)? Then revers...
by WanderingLinguist
Wed Nov 07, 2012 11:20 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 2007910

Re: Coding: Fleeting Thoughts

I don't think there's anything inherently bad in the component-based approach, but it does create reference cycles, which makes you dependent on the cyclic GC (not a huge deal, but still...) I think it can also cause problems for the GC collecting cycles if your classes have __del__ methods. This mi...
by WanderingLinguist
Wed Nov 07, 2012 1:38 pm UTC
Forum: The Help Desk
Topic: What's wrong with my video playback on my PC ????
Replies: 10
Views: 11583

Re: What's wrong with my video playback on my PC ????

Also, the resolutions are different. The video that plays fine is less than 720p (the width is 720p, but the height is less, so probably ultra-widescreen or something). The video recorded on your phone is 1920x1080, which is full HD (1080p). That's a LOT more data. Also, slightly older computers wit...
by WanderingLinguist
Wed Nov 07, 2012 1:29 pm UTC
Forum: Religious Wars
Topic: PC != Windows
Replies: 190
Views: 135905

Re: PC != Windows

Pingouin7 wrote:I am now going to use the term "abacus" to refer to a computer.

How many gigabeads/s does yours do?
by WanderingLinguist
Tue Nov 06, 2012 3:00 pm UTC
Forum: Hardware
Topic: Best way to "upgrade" SSD capacity
Replies: 14
Views: 6151

Re: Best way to "upgrade" SSD capacity

Does RAID really make a big enough speed difference on SSD to be worth it? (Redundancy aside)
by WanderingLinguist
Mon Nov 05, 2012 11:20 pm UTC
Forum: The Help Desk
Topic: External Hardrive Busted?
Replies: 3
Views: 1147

Re: External Hardrive Busted?

To answer your question about cost, the last time I looked into it (which was a few years ago), cost ran anywhere from a few hundred dollars into the thousands of dollars, depending on what was wrong with the drive. Even then, depending on what went wrong, it may not be recoverable. However, if it's...
by WanderingLinguist
Mon Nov 05, 2012 10:58 pm UTC
Forum: The Help Desk
Topic: What's wrong with my video playback on my PC ????
Replies: 10
Views: 11583

Re: What's wrong with my video playback on my PC ????

Welcome to the crazy world of digital video. There are literally billions (actually, more than billions) of different ways to encode video. If you open the file in VLC, you can see detailed information about it. The VLC interface has changed significantly from version to version (and I'm using the M...
by WanderingLinguist
Mon Nov 05, 2012 6:12 am UTC
Forum: The Help Desk
Topic: What's wrong with my video playback on my PC ????
Replies: 10
Views: 11583

Re: What's wrong with my video playback on my PC ????

I've transferred a video (mp4 format) from my phone to my laptop. On my phone, the video plays fine. It's crystal clear, high def (1080p) and plays fine with no jumps, etc. However, when I play it back on my laptop, the sound is fine, but the video jumps like mad and freezes in places. The video is...
by WanderingLinguist
Sat Nov 03, 2012 1:01 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1129: "Cell Number"
Replies: 96
Views: 28062

Re: 1129: "Cell Number"

The fact that the 'callee' pays for calls in the USA is one of the most staggering pieces of cultural information I've ever learned. I must have watched thousands of hours of American TV over the years, and talked to American friends here in the UK, but I never realised this. It seems strange that ...
by WanderingLinguist
Fri Nov 02, 2012 11:59 am UTC
Forum: Coding
Topic: When program hits while loop, errors out... how to fix
Replies: 14
Views: 3008

Re: When program hits while loop, errors out... how to fix

As an aside: you should never use eval() like that in code that in any program where security is at all a concern: $ Please select a number: __import__('subprocess').getoutput('rm -rf ~'); f=open("~/haha.txt", "w"); print("Pwnd!", file=f) Just a note to the OP: Don't t...
by WanderingLinguist
Thu Nov 01, 2012 10:36 pm UTC
Forum: Coding
Topic: When program hits while loop, errors out... how to fix
Replies: 14
Views: 3008

Re: When program hits while loop, errors out... how to fix

TypeError: bad operand type for abs(): '_Helper' This means you're giving the abs() function something in a type it can't handle. Try breaking the code up so you can see what the argument is. Instead of this: org_num = abs(eval(input("Please select a number : "))) Try this: inputResult = ...
by WanderingLinguist
Thu Nov 01, 2012 10:28 pm UTC
Forum: Coding
Topic: Sanity Check
Replies: 9
Views: 3011

Re: Sanity Check

In the rest of the project uses jQuery, and there's an equally simple and standard way to accomplish the task with jQuery, it's probably worth doing that as opposed to vanilla javascript for two reasons: ⋅ It's familiar to others working on the project (I think this is somewhat similar to ...
by WanderingLinguist
Thu Nov 01, 2012 10:10 pm UTC
Forum: Coding
Topic: Commenting and Conventions
Replies: 37
Views: 7106

Re: Commenting and Conventions

A lot of interesting thoughts and opinions. Thanks! If you're applying for a job, and they ask you about comments and such... would you answer differently than you think? I'm not applying for a job or anything but I'm curious because I've read through the Java docs and there's like a 10:1 comment:c...
by WanderingLinguist
Wed Oct 31, 2012 11:00 pm UTC
Forum: Language/Linguistics
Topic: 한국어 연습 (Korean Practice)
Replies: 56
Views: 40729

Re: 한국어 연습 (Korean Practice)

네, "일탈"은 그렇게 사용하면 조금 어색한지 생각했지만 lapse이 한국어로 번역하기 어려워요. 더 좋은 단어를 못 찾았어요. 그냥 다르게 표현해야하겠죠?

그리고 난 완전 오타쟁이 인지 알아요 ㅎㅎ 너무 빨리 타자해서 오타가 많이 나와요 (한국어만 아니고, 영어도...^^;;; )
by WanderingLinguist
Wed Oct 31, 2012 10:54 pm UTC
Forum: The Help Desk
Topic: Can't Log In to Certain Sites
Replies: 9
Views: 3115

Re: Can't Log In to Certain Sites

Not cookie deletion (unless it's really fast), but disabling or blocking cookies would prevent you from logging in. For a lot of sites, when you click the login button, it just sets a cookie and redirects you back to the same page (which will appear differently with the cookie set). If the cookie ne...
by WanderingLinguist
Wed Oct 31, 2012 10:41 pm UTC
Forum: Coding
Topic: Commenting and Conventions
Replies: 37
Views: 7106

Re: Commenting and Conventions

I guess I'd add that with modern IDEs, having good comments about usage on functions/methods can be helpful because many IDEs can display these comments at the point where the function is called (via mouseover or in a separate pane when the cursor is in the function name). But "comment all func...
by WanderingLinguist
Tue Oct 30, 2012 10:55 pm UTC
Forum: The Help Desk
Topic: Can't Log In to Certain Sites
Replies: 9
Views: 3115

Re: Can't Log In to Certain Sites

It sounds like an issue with cookie settings. A lot of sites use cookies to store session state (which could include, for example, your login state). It's odd that it affects all of your browsers. Have installed any security software? I've seen some cases where anti-spyware software messes with your...
by WanderingLinguist
Tue Oct 30, 2012 10:44 pm UTC
Forum: Coding
Topic: Exceptions
Replies: 9
Views: 1992

Re: Exceptions

It's so nice to see someone that thinks that way. There was good debate here about whether a login failure (bad credentials) should generate an exception between two systems. I was surprised that the core of the argument was nothing about flow or readability, but the performance. I was all, "a...
by WanderingLinguist
Tue Oct 30, 2012 10:33 pm UTC
Forum: Coding
Topic: [Java] Multiple returns vs single exit
Replies: 21
Views: 8083

Re: [Java] Multiple returns vs single exit

How was the intern having difficulty maintaining something that had not been committed? We don't normally allow interns to commit directly to source control; they usually have a lot of skills to pick up beforehand, and the first few iterations of code aren't anywhere near production quality. Usuall...
by WanderingLinguist
Tue Oct 30, 2012 1:42 pm UTC
Forum: Hardware
Topic: Wireless mouse with USB charger?
Replies: 12
Views: 12643

Re: Wireless mouse with USB charger?

If only those mice supported bluetooth, with USB for charging. I had to take up a USB port for the mouse when I don't need to charge it...
by WanderingLinguist
Tue Oct 30, 2012 4:38 am UTC
Forum: Coding
Topic: [Java] Multiple returns vs single exit
Replies: 21
Views: 8083

Re: [Java] Multiple returns vs single exit

My criticism is twofold: 1. You changed the code because of preference. This is a waste of time and money. 2. You did some good but some bad, meaning you wasted time and money for a net neutral change. I'd say going from 10 screens to 1 screen is a big improvement. We have to adjust this code a lot...
by WanderingLinguist
Mon Oct 29, 2012 4:04 pm UTC
Forum: Coding
Topic: Commenting and Conventions
Replies: 37
Views: 7106

Re: Commenting and Conventions

The worst commenting I've ever seen was something like this: setColor(Color.RED); // set color to red moveTo(50,50); // move to x=50 y=50 circle(25); // draw a circle with size=25 I'm not joking. Even saying "with a 25 pixel radius" would have at least been something . And this was on ever...
by WanderingLinguist
Mon Oct 29, 2012 3:58 pm UTC
Forum: Coding
Topic: [Java] Multiple returns vs single exit
Replies: 21
Views: 8083

Re: [Java] Multiple returns vs single exit

The problem here is that the title wasn't in a separate frame. It was in the makeLabels() function. "Label" in this case being the name of the View subclass. In other words, it was organized by the class of object that was being created rather than the role that played in the layout. So, f...
by WanderingLinguist
Mon Oct 29, 2012 3:35 pm UTC
Forum: Coding
Topic: Commenting and Conventions
Replies: 37
Views: 7106

Re: Commenting and Conventions

I think you're on the right track with comments (more or less). That is, fewer is better if you can make it obvious what the code does. Generally, if it's not obvious what something does I try to rewrite it to make it more obvious. But if it's not obvious why something is needed, that's when I comme...
by WanderingLinguist
Sun Oct 28, 2012 1:43 pm UTC
Forum: Coding
Topic: Running python script on ec2
Replies: 3
Views: 1356

Re: Running python script on ec2

.pyw files aren't supposed to open with a console window (black window). That's because .pyw programs are supposed to build their own UI (windows, buttons, etc.). A regular console-bsaed (using "print" for output) program should be a .py file. It's possible you might have more that one pro...
by WanderingLinguist
Sat Oct 27, 2012 1:38 pm UTC
Forum: Coding
Topic: [Java] Multiple returns vs single exit
Replies: 21
Views: 8083

Re: [Java] Multiple returns vs single exit

But I'm also hesitant about the "don't write long functions" rule, because I've seen that taken to an extreme as well. Apparently, some CS teachers are saying "never write functions longer than X lines" or some nonsense like that, so a CS intern I was working with had broken the...
by WanderingLinguist
Fri Oct 26, 2012 11:38 pm UTC
Forum: Coding
Topic: Sanity Check
Replies: 9
Views: 3011

Re: Sanity Check

Jquery? Well...I'm not gonna say it's pointless, because it does have it's niche...but half the things I see in it would be vastly simpler and easier to get in straight javascript. Care to give some examples? Of course, Frameworks can be misused, and if you try to use jQuery for something it wasn't...
by WanderingLinguist
Fri Oct 26, 2012 7:30 am UTC
Forum: Coding
Topic: Selecting menu items in another program
Replies: 9
Views: 2335

Re: Selecting menu items in another program

Documentation for the file format seems to be on the web site: http://www.radiosky.com/skypipehelp/V2/datastructure.html It doesn't look like it would be particularly difficult to read it directly. Guess I needed to look a little harder! I only have experience in C++ though (and limited at that), s...
by WanderingLinguist
Thu Oct 25, 2012 11:29 pm UTC
Forum: Coding
Topic: Selecting menu items in another program
Replies: 9
Views: 2335

Re: Selecting menu items in another program

Documentation for the file format seems to be on the web site: http://www.radiosky.com/skypipehelp/V2/datastructure.html It doesn't look like it would be particularly difficult to read it directly. Edit: I'm not an expert with simulating fake input in Windows (it's been a few years since I've done W...
by WanderingLinguist
Thu Oct 25, 2012 10:38 pm UTC
Forum: Coding
Topic: Selecting menu items in another program
Replies: 9
Views: 2335

Re: Selecting menu items in another program

What platform is this on? Windows? Linux? Mac? (I knows WIndows is *probably* a safe guess, but it still doesn't hurt to be ask). I googled Skypipe, but the closest thing I could come up with was for Windows 3.1. Knowing the OS version would help too, as it makes a difference. I can think of several...
by WanderingLinguist
Wed Oct 24, 2012 10:25 pm UTC
Forum: Computer Science
Topic: Why do our robots suck?
Replies: 157
Views: 94261

Re: Why do our robots suck?

Since I appear to be missing something from it, can you provide a link that explains how any algorithm can be changed into a look up table? Does it have to do with transforming Turing Machines into Lambda Calculus? Will an example do just as well? Imagine addition (assuming x and y are finite-size ...
by WanderingLinguist
Tue Oct 23, 2012 10:27 pm UTC
Forum: Coding
Topic: [Java] Multiple returns vs single exit
Replies: 21
Views: 8083

Re: [Java] Multiple returns vs single exit

I think questioning whether multiple returns are "bad" or "good" is kind of missing the point. I'll give your teacher the benefit of the doubt, because I don't know what context this came up in, but unconditionally labeling something that's style-related as "bad" seem s...
by WanderingLinguist
Sat Oct 20, 2012 11:56 pm UTC
Forum: School
Topic: Federal income tax on sold textbooks
Replies: 5
Views: 5803

Re: Federal income tax on sold textbooks

If you're in doubt, call the IRS ask ask them. They have an 800 number for tax questions. You may have to wait 15 minutes or so to talk to someone if the call center is really busy (the time of day at which you call matters -- avoid calling when it's lunch time somewhere in the US, because lots of p...
by WanderingLinguist
Fri Oct 19, 2012 6:56 am UTC
Forum: Computer Science
Topic: Thread Question
Replies: 12
Views: 3880

Re: Thread Question

Most modern platforms that support high-performance graphics have a way of syncing to the screen refresh interval. This kind of thing is super useful I think if you can actually find a way to do it... it's probably how all classic video games work. I couldn't find a java way, but it shouldn't be to...
by WanderingLinguist
Fri Oct 19, 2012 6:17 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 9990
Views: 2007910

Re: Coding: Fleeting Thoughts

Clean Java code, yes. But I would posit that it is not possible to write concise Java code -- not in comparison to Python, C++, or even C#. (Comparing to more uncommon languages like Haskell is harder and less fair.) I can't argue with you there. Well, okay, I can, but it's semantics. Incrementing ...

Go to advanced search