Open Side Menu Go to the Top
Register
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** ** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

10-21-2013 , 02:32 PM
I believe the company we were piloting on used load runner http://www.radview.com to stress test our site in Australia. It had user paths through the site but that's about all I knew about it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-21-2013 , 06:49 PM
I think Linux Mint 15 Cinnamon looks great fwiw.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-21-2013 , 08:34 PM
"The hamming distance between two bit strings of length n is equal to the number of bits in which the the two strings differ.
Write a program that reads in an integer k and a bit string s from the command line, and prints out all bit strings that have Hamming distance k from s.
For example if k is 2 and s is 0000, then your program should print:
0011 0101 0110 1001 1010 1100"

Anyone have ideas on how this should be done? I'm just looking for some guidance to get started as I'm pretty much stuck and not sure how to try to solve this.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-21-2013 , 08:58 PM
Start simple.

What do you have to do to get a new string (S') that has a Hamming distance k from S?

You're going to need a loop of some sort to find each possible combination. So think about how you can modify the above to be more general and find each possible S'.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-21-2013 , 09:15 PM
just a quick sanity check, if your input string is length n, then you know the number of outputs you'll need produce is (n choose k). that should help both with writing tests and figuring out how to actually produce the outputs.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-21-2013 , 09:21 PM
I actually managed to solve this

Code:
public class HammingDistance
{
	public static void main(String[] args)
	{
		int k = Integer.parseInt(args[0]);
		String s = args[1];
		int l = s.length();
		
		printBin(k, s, "", l);

	}
	
	
	public static void printBin(int k, String s, String bitString, int iterations) 
	{
		if(iterations == 0) //generated bit string has reached length l
		{
			int count = 0;
			
			for(int i = 0; i < s.length(); i++)
			{
				if (s.charAt(i) != bitString.charAt(i)) count++;
			}
				
			if (count == k) System.out.println(bitString);
		}
	
		else 
		{
			 //Recursively generates all possible bit strings of length l
			printBin(k, s, bitString + "0", iterations - 1);
			printBin(k, s, bitString + "1", iterations - 1);
		}
	}
}
Does this code make sense or does it need more explaining?
Do you see anything that could be better written?

EDIT: Although the above code works I'm pretty sure a better solution exists which doesn't involve generating every possible bit string of length l and comparing it to the original bit string, but instead does something like change k bits in string s (original bit string) and prints out every possible way s can be changed by k bits. I'm not sure how this should be done though, if anyone has ideas

Last edited by DirtySprite; 10-21-2013 at 09:29 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-21-2013 , 09:42 PM
g_m,

you could use something like webdriver (nee selenium) to drive actual web browsers. we do this (...extremely poorly) at work.

we also use sauce labs, which provides a variety of oses and browsers in a vm that YOU DON"T HAVE TO MAINTAIN, controlled via webdriver. it's kind of awesome but it kind of sucks.

maybe entirely not what you're looking for but gives you another angle on the problem. gl.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-21-2013 , 09:59 PM
Quote:
Originally Posted by Nchabazam
What does work decently in virtualbox then? Something that ideally isn't super difficult to learn to use.
You use RoR and Angular, what could possibly be difficult for you to use at this point?

Real answer: IDK. "Super difficult" is sort of relative. I'd consider Linux from Scratch, building a Lisp assembler on a commodore64, and climbing K2 "super difficult." I just tell people to use Arch and get over their silly fears.

Quote:
Originally Posted by gaming_mouse
i've had a perfectly fine experience with it...
The snap-frames broke and were wonky, mouse could only hover about 75% of the entire window, leaving the edges unreachable, frozen windows, throttling, broken internet, etc. I found the UI to be relatively frumpy and the Amazon Spyware was a major turn-off as well. After I uninstalled 80% of the bloat, it sort of worked, so I installed Unity and that was just a similar hell to Gnome. I then installed LXDE, then looked at the mess I created along with all the excess bloat in my OS and did a bit of mental calculation and decided it would be a good month of constant uninstalling and attention before I would get it to my satisfaction. And it still ran too slow for my tastes anyways.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-21-2013 , 10:23 PM
Quote:
Originally Posted by DirtySprite
EDIT: Although the above code works I'm pretty sure a better solution exists which doesn't involve generating every possible bit string of length l and comparing it to the original bit string, but instead does something like change k bits in string s (original bit string) and prints out every possible way s can be changed by k bits. I'm not sure how this should be done though, if anyone has ideas
Start by figuring out how you would write the code to generate all examples with one bit flipped.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-21-2013 , 11:58 PM
Quote:
Originally Posted by daveT
The snap-frames broke and were wonky, mouse could only hover about 75% of the entire window, leaving the edges unreachable, frozen windows, throttling, broken internet, etc. I found the UI to be relatively frumpy and the Amazon Spyware was a major turn-off as well. After I uninstalled 80% of the bloat, it sort of worked, so I installed Unity and that was just a similar hell to Gnome. I then installed LXDE, then looked at the mess I created along with all the excess bloat in my OS and did a bit of mental calculation and decided it would be a good month of constant uninstalling and attention before I would get it to my satisfaction. And it still ran too slow for my tastes anyways.
And you want to know why people use OSX?

/troll
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-22-2013 , 03:20 AM
@tyler,

thx for the suggestion
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-22-2013 , 07:16 AM
That's why they have lubuntu. It comes with LXDE and you don't have to configure anything to get a minimal installation that just works.
http://www.lubuntu.net/

The min reqs are a Pentium II with 128MB of ram. I think even a low end machine today should be able to run it ok haha. I've been running it for about a year now in a VM without issues.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-22-2013 , 11:51 AM
Quote:
Originally Posted by daveT
You use RoR and Angular, what could possibly be difficult for you to use at this point?

Real answer: IDK. "Super difficult" is sort of relative. I'd consider Linux from Scratch, building a Lisp assembler on a commodore64, and climbing K2 "super difficult." I just tell people to use Arch and get over their silly fears.
<3 RoR, so easy.

Angular is a little trickier, but amazing.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-22-2013 , 12:28 PM
I have only glanced over the automated webstuff discussion but it sounds like something we did with Selenium...maybe I'm completely misunderstanding.

In unrelated news I'm currently rewriting the script for one of my lectures in Latex and it's both surprisingly awesome and cumbersome at the same time
I'm really slow at encoding mathematic formulas though...like son of a bitch slow (mostly because I have to look up pretty much everything :P)

Re my podcasts question:
I downloaded what sounded most interesting from FLOSS weekly, This Developer's Life and some others I'm forgetting. Listened to some stuff about personal Kanban..was meh, interview with the Zotonic developers was interesting, and stuff about abstraction and learning (liked the abstraction one, didn't care all that much for the learning one)
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-22-2013 , 01:15 PM
Quote:
Originally Posted by Nchabazam
What does work decently in virtualbox then? Something that ideally isn't super difficult to learn to use.
debian minimal install is the only way to go
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-22-2013 , 03:24 PM
Quote:
Originally Posted by daveT
May I ask what the critical VAS of the 3x price tag is?

I'll be the first to admit that development on Windows sucks, but why Apple over *nix then?
sorry for the delayed response.

So, maybe I shouldn't have said 3x. I bought a Core Duo 'Air, 2.13G shortly before they cycled out. If I'd gone with windows, I may not have bought equivalent hardware. That said, I think I would've fought with the OS just as much either way.

The value for me was simple not fighting with the OS. At the time, I was trying to learn RoR, which, apparently, is notorious for not working on Windows. I tried putting linux on my then windows laptop but had many of the same problems as I'd had with Windows. This, apparently, is not as common as people having problems with windows, but I had a hard time getting things to work. I got extremely frustrated, bought my mac, and have never looked back. I rarely have the urge to hit it, kick it, or throw it across the room, which is, otherwise, pretty common for me.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-22-2013 , 04:39 PM
Can't argue with that. I'd be much further along if I someone told me at day one that fighting with your OS, framework, and development tools is not worth the fight. That was why I ditched Ubuntu so quickly. I went to war with it, but at least I only lost a few hours to it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-22-2013 , 06:26 PM
Don't get the fighting the OS re: windows stuff at all. As a FED I can work on both macs and windows at about the same level. For Windows I need to.. install ruby. Thats about the only difference. I tend to like Windows because of "native IE support" and because F5 > cmd+R mostly.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-22-2013 , 06:27 PM
Quote:
Originally Posted by MrWooster
What are the odds they release their own 4k display anytime soon?

I am craving some mass produced retina desktop displays. 1440p doesn't cut it compared to what they are offering in every other product.

edit: I should research it a bit, but getting a new mbp seems like a decent idea considering I can prolly sell my current one for a good amount, and use whatever new display they'll likely launch. Also, more battery life and general speed increases would be welcome.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-22-2013 , 06:32 PM
Quote:
Originally Posted by MrWooster
I took a few minutes to drool over that earlier. The exciting thing is, one of my projects involves a lot of calculations and can actually make use of the power.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-22-2013 , 08:51 PM
Quote:
Originally Posted by daveT
I'd be much further along if I someone told me at day one that fighting with your OS, framework, and development tools is not worth the fight.
we didn't tell you this?

the tricky part is that you have to fight with them a lot early in your career to figure out which one is best for you, and then periodically after that so you don't miss out on big wins.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-22-2013 , 09:39 PM
Quote:
Originally Posted by Grue
Don't get the fighting the OS re: windows stuff at all. As a FED I can work on both macs and windows at about the same level. For Windows I need to.. install ruby. Thats about the only difference. I tend to like Windows because of "native IE support" and because F5 > cmd+R mostly.
I certainly learned a lot trying to develop with Windows, but at some point, enough is enough. Not sure about RoR, but I know that there is a ton of irritation due the the simple fact that Windows was neglected for way too long and it may not be fixed for a long time. Hell, Python *finally* added a true Windows installer. Let's not talk about having to use Cygwin or Mingw to get a half-assed C compiler.

Quote:
Originally Posted by tyler_cracker
we didn't tell you this?

the tricky part is that you have to fight with them a lot early in your career to figure out which one is best for you, and then periodically after that so you don't miss out on big wins.
Yes, agreed. If it gets you over the fear of trying something else, then it is all for the better I guess.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-23-2013 , 12:47 AM
Re tools, giving up, etc

Part of the reason I was motivated to drop Unity from that VM was the realization that I had just spent five minutes trying to figure out how to open two terminals at once.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-23-2013 , 10:40 AM
By the time I was done with Ubuntu, I had at least 5 terminal emulators. I think Gnome and Unity each have two, but I wouldn't know the logic for that.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m