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

10-24-2014 , 01:12 AM
Quote:
Originally Posted by Grue
Anyone become/pick up a scrummaster role? Good idea/bad idea? I have no designs on becoming mgmt at any time in near future but will probably change jobs in 4-16 months.
What do you do now?

At my work, most of the scrum owners (we call them product owners, same thing?) come from non-technical background. They deal with the business sides of things. Gathering requirements, managing timelines, and setting expectations with business. They are the bridge between development and business. You will find them managing Jira and making user stories. At least that's I get from working with them.

By the way, funny thing at work the other day. One of the auto-generated emails we send out needed to a link in the email to be changed from
Code:
www.example.com/ltw
to
Code:
www.example.com/twoplustwo
.

Simple change right? The change was worked on, went to QA, passed and went into production. Was one story point. No one thought anything could go wrong.

Two weeks pass by, the person who requested the change, reported that the link was incorrect. We thought wtf, how could that be? Looking at the email, the link was changed to
Code:
www.example.com twoplustwo


The real kicker was that attached to the Jira story, the QA person posted the evidence of the passed "evidence". The "evidence" consisted of a Microsoft Word doc with a screenshot of the new link with the space in the link. The running joke was that the scope of the project was to change the link, it didn't matter if it actually brought you to an actual page.

Not sure how my company justifies outsourcing their development team, because it has been pretty bad lately. Every day after deployment, something breaks.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 01:29 AM
Quote:
Originally Posted by daveT
You got a job now, so you're free to slack. j/k

You're not the first here to say Algorithms and Data Structures can be pretty rough. I'd like to see how well I'd do on a test like this. As long as they don't ask for heapsort*, I'll be fine.

*... and pretty much everything else, lol(?).
This class is about the actual theory behind algorithms, so basically proving a bunch of stuff mathematically. The first test was about proving big o, little o, theta, little omega, big omega.

This test was about recurrences and sorting algorithms.

We are now working on dynamic programming, which is a really interesting subject. The Manhattan Tourist Problem and the Knapsack Problem are both really cool.

If you are in to interesting sorting algorithms, here's a fun homework question we had:

You have a set of cups, and a set of lids. Each cup has a matching lid. Write an efficient algorithm to match all the cups with their lid. You are not allowed to compare a cup to a cup, or a lid to a lid.

Last edited by KatoKrazy; 10-24-2014 at 01:36 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 02:18 AM
Not sure if I understand the question, but this is what I'm thinking he means:

Code:
def lid_cups (lids, cups):
    lc = []
    for i in lids:
        cups.remove(i)
        lc.append((i, i))
        print(cups)
    return lc

ll = [1, 2, 3, 4, 5, 6]
cc = [3, 2, 1, 4, 6, 5]

print (lid_cups(ll, cc))
My intention is to reduce the space. The print statement in the code shows my intention of reducing the space of cups:

Code:
>>> [3, 2, 4, 6, 5]
[3, 4, 6, 5]
[4, 6, 5]
[6, 5]
[6]
[]
The output like so:

Code:
[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)]
As for the proofs, I'm not very good at them. I just think of time complexity as Taylor Expansions, then fall back to the Master Theorem when I'm not sure. This is one area where I really wish I had a classical education.

FWIW, I still get that this is n time amortized, but something rather ugly worst-case.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 02:37 AM
This is probably a dumb question, but if I pull up a French or Japanese website, why does it look the right way?

In other words, I assume the html and css and whatnot are not in English, but I'm using an English browser. Do all browsers support other languages by default? Or is there some other background thing going on that makes it work right?

Okay, I guess I answered my own question by looking up the French parliament website in its original language. All the html code is the standard stuff even when I'm not looking at the English translation page.

Does that mean these other countries all have to learn English to play on the Internet? Or at least enough of it to build webpages in our languages like html?

This probably sounds dumb and somewhat nationalistic. I swear, I have French friends!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 03:35 AM
Quote:
Originally Posted by Barrin6
By the way, funny thing at work the other day. One of the auto-generated emails we send out needed to a link in the email to be changed from
Code:
www.example.com/ltw
to
Code:
www.example.com/twoplustwo
.

Simple change right? The change was worked on, went to QA, passed and went into production. Was one story point. No one thought anything could go wrong.

Two weeks pass by, the person who requested the change, reported that the link was incorrect. We thought wtf, how could that be? Looking at the email, the link was changed to
Code:
www.example.com twoplustwo


The real kicker was that attached to the Jira story, the QA person posted the evidence of the passed "evidence". The "evidence" consisted of a Microsoft Word doc with a screenshot of the new link with the space in the link. The running joke was that the scope of the project was to change the link, it didn't matter if it actually brought you to an actual page.

Not sure how my company justifies outsourcing their development team, because it has been pretty bad lately. Every day after deployment, something breaks.
Lol outsourcing is the devil. It's our crunch time right now so we've outsourced a couple projects that were relatively simple that we didn't have time for.

They did a good job on the first one so we threw a second their way. Turns out the first one was partially specced wrong and partially total lack of insight leading to an issue that caused tons of manual work for some of my coworkers. It took about 15 minutes to fix and anyone in house would have never made the mistake to begin with. And I suspect that even most outsiders with half a brain would have at least asked about it.

Anyway they just finished the second project. It's a **** show. It's almost entirely front end written in coffee script and "angular". The angular controller code is essentially jquery with direct dom manipulation everywhere. There are numerous cases where they grossly misinterpreted our api docs. It took almost a week to fix everything and actually get it working properly.

Since then working with the outsourced teams from several huge national companies I've seen tons of craziness.

Someone in it caused all of their servers to be unable to reach outside services. Nothing, not even Google. Not actually outsourced, but H1B for sure.

One company was looking for sandbox data on our production server and made the same exact request for it 500 times over two hours. They are not set up as live on our production servers.

And my personal favorite. One company sends us bad data, ignores the 40x response, and goes ahead with their customer like everything is fine.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 08:08 AM
Quote:
Originally Posted by Anais
Does that mean these other countries all have to learn English to play on the Internet? Or at least enough of it to build webpages in our languages like
Sort of.

If you actually look at most languages (even including the core/popular libraries of a language) the key syntax and function calls are in English so non-English people have to learn enough to use those. But that's only sort of learning english - it's more just learning what those words do in a programming context.

Take for example:

Code:
System.out.println("foo");
That's obviously easier to understand if you know English - but the real understanding is in the programming context. If I showed that to most English professors they'd have no idea what it means.

But variables/functions/classes/etc. can still be named in whatever language (well, most languages) the programmer uses. So French people can still write a French program that has French comments and names.

Edit: There are non-English based programming languages but I don't think they're heavily used anywhere.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 09:13 AM
Came across a really cool utility the other day, https://ngrok.com/

1 use case that I'm using it for:

Start an app server on some port, run ngrok with that port number. It exposes a real url over HTTPS using a tunnel to localhost.

This lets you embed your development code into other sites that allow iframes but require SSL without having to setup a reverse proxy on your end.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 10:06 AM
When I found ngrok I was super amazingly happy.

I was in the middle of building stripe integration and the process for working on callback functionality was brutal until I found this.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 10:17 AM
Quote:
Originally Posted by Barrin6
What do you do now?

At my work, most of the scrum owners (we call them product owners, same thing?) come from non-technical background. They deal with the business sides of things. Gathering requirements, managing timelines, and setting expectations with business. They are the bridge between development and business. You will find them managing Jira and making user stories. At least that's I get from working with them.
oh I'm a "senior software engineer"/only front end developer for a web team of about 10. Other technical guy/scrum master is being promoted to management so I'd assume I can take over leading scrums/providing assistance to get impediments cleared up. But really don't want to have to spend a bunch of time dicking around in Jira. I'd assume the BSAs and PMs will still do that?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 10:55 AM
Quote:
Originally Posted by Grue
Anyone become/pick up a scrummaster role? Good idea/bad idea? I have no designs on becoming mgmt at any time in near future but will probably change jobs in 4-16 months.
Probably can't hurt to be able to put it on the resume but I have a feeling it's going to be a different role in every company. I lead the morning stand ups more often than not which is about the extent of scrum mastering we use. YMMV.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 12:03 PM
Most companies screw up scrum anyway.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 01:00 PM
Quote:
Originally Posted by daveT
Not sure if I understand the question, but this is what I'm thinking he means:

Code:
def lid_cups (lids, cups):
    lc = []
    for i in lids:
        cups.remove(i)
        lc.append((i, i))
        print(cups)
    return lc

ll = [1, 2, 3, 4, 5, 6]
cc = [3, 2, 1, 4, 6, 5]

print (lid_cups(ll, cc))
My intention is to reduce the space. The print statement in the code shows my intention of reducing the space of cups:

Code:
>>> [3, 2, 4, 6, 5]
[3, 4, 6, 5]
[4, 6, 5]
[6, 5]
[6]
[]
The output like so:

Code:
[(1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6)]
As for the proofs, I'm not very good at them. I just think of time complexity as Taylor Expansions, then fall back to the Master Theorem when I'm not sure. This is one area where I really wish I had a classical education.

FWIW, I still get that this is n time amortized, but something rather ugly worst-case.
I gather he means you aren't allowed to sort each set first.

Your algorithm will O(n^2) time, since for removal you have to check against every element (in the worst case).

I assume since this is dynamic programming there is something clever that does better. I don't see it immediately though.

Not really seeing any connection between time complexity and Taylor series either, other than the sum of a variable being raised to integral powers. Higher exponents in Taylor series represent smaller terms, whereas the reverse is true with time complexity analysis. Also the latter has nothing to do with derivatives or function estimation, which is the heart of Taylor series.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 01:49 PM
Quote:
Originally Posted by gaming_mouse
I gather he means you aren't allowed to sort each set first.
I guess I shouldn't have wrote the ll variable in sorted order. The idea was to place the lids on the cups correctly, which the function accomplishes regardless the order of the lids or the cups. If the output must be sorted, then we can compare cups to lids after they are attached to the cups, comparing the 0 and 1 indices of the tuples.

The question as asked is too ambiguous for me to really do anything with. If I was to take a shot at the most appropriate algorithm, I'd consider using a variation of the stable marriage problem before sorting. My function sort of goes in that direction, but I've never written a stable marriage function, so I'm not sure how close mine comes.

Quote:
I assume since this is dynamic programming there is something clever that does better. I don't see it immediately though.
Me neither, but I'm going to look it up today.

Not sure if they were testing for dynamic programming yet.

Quote:
Not really seeing any connection between time complexity and Taylor series either, other than the sum of a variable being raised to integral powers. Higher exponents in Taylor series represent smaller terms, whereas the reverse is true with time complexity analysis. Also the latter has nothing to do with derivatives or function estimation, which is the heart of Taylor series.
I'm talking about the asymptotic behaviors, upper / lower -bounds, and removing "junk," which are pretty much the same thing we do in [o, theta, omega](n) notation when we break n^2 + n + 1 down and call it n^2, etc etc etc.

I'm also pretty sure that CS ideas of complexity are directly derived from Taylor Expansions, but I'm not sure, so don't hold me to this if I'm wrong.

Last edited by daveT; 10-24-2014 at 02:01 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 01:56 PM
I think I wasn't specific enough on the problem. Will post better explanation later.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 03:17 PM
Quote:
Originally Posted by daveT
I guess I shouldn't have wrote the ll variable in sorted order. The idea was to place the lids on the cups correctly, which the function accomplishes regardless the order of the lids or the cups. If the output must be sorted, then we can compare cups to lids after they are attached to the cups, comparing the 0 and 1 indices of the tuples.

The question as asked is too ambiguous for me to really do anything with. If I was to take a shot at the most appropriate algorithm, I'd consider using a variation of the stable marriage problem before sorting. My function sort of goes in that direction, but I've never written a stable marriage function, so I'm not sure how close mine comes.



Me neither, but I'm going to look it up today.

Not sure if they were testing for dynamic programming yet.



I'm talking about the asymptotic behaviors, upper / lower -bounds, and removing "junk," which are pretty much the same thing we do in [o, theta, omega](n) notation when we break n^2 + n + 1 down and call it n^2, etc etc etc.

I'm also pretty sure that CS ideas of complexity are directly derived from Taylor Expansions, but I'm not sure, so don't hold me to this if I'm wrong.
big O notation can be applied to both taylor series and complexity analysis, just in the sense of asymptotic behavior as you said. i have never heard of complexity analysis being derived from taylor series, though, and i can't imagine how it would be as the two concepts have nothing to do with each other, but i suppose it's possible there's a connection i don't know about. you had originally said that you "thought of" complexity as taylor expansions, which i why i mentioned it.

the marriage problem algorithm shouldn't apply to this lid problem, at least as stated above, since the "matching" in the marriage problem has to do with stableness with respect to a preference function. the analogy here would be each cup has an ideal lid, but also could be fitted with other lids it doesn't like quite as much. but that's not the case: here each lid matches one and only one cup.

ofc this is all probably moot since kato said he needs to clarify the problem.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 04:33 PM
Alright, here is how the problem was given to us exactly:

You are given n lids of different diameters, corresponding to travel mugs. Choosing a mug and a lid, you can determine whether the lid is larger than the mug, smaller than the mug, or a perfect match. However, it is not allowed to compare two mugs directly or two lids directly. The problem is to match all the mugs with their corresponding lid. The following algorithm BruteForceMugLids can be used to solve the problem.

Input: Arrays Mugs[1...n], and Lids[1...n]
Output: A permutation of Mugs and Lids such that Mugs[i] matches Lids[i], 1 <= i <=n

BruteForeMugsLids(Mugs, Lids, n)
for i = 1 to n -1
found = False
j = i
while not found
if Mugs[i] matches Lids[j]
swap Lids[i],Lids[j]
found = True
j += 1

Clearly this is an O(n^2) algorithm.

Give a more efficient, recursive, divide-and-conquer algorithm that solves the same "mugs and lid" problem described previously.
a. Describe your idea in plain English
b. Write down your algorithm formally using pseudocode
c. What is the running time of your algorithm in the simplest theta-notation? Justify your answer
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 04:36 PM
Me and a friend were able to do it in nlogn time using a variation on a very important recursive sorting algorithm.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 05:07 PM
You can pick a random mug and sort lids relative to it. Keep your matching lid and sort mugs relative to it. That'll give you two simpler problems to solve. I'm guessing that's the n log n solution but I'm lazy.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 05:22 PM
Scrum masters http://youtu.be/nV7u1VBhWCE
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 05:33 PM
Quote:
Originally Posted by jjshabado
You can pick a random mug and sort lids relative to it. Keep your matching lid and sort mugs relative to it. That'll give you two simpler problems to solve. I'm guessing that's the n log n solution but I'm lazy.
Correct. We modified quick sort to take in the array of mugs and array of lids, and use mug as pivot to sort lids, and lid as pivot to sort mugs, keeping matching sets.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 10:56 PM
Quote:
Originally Posted by gaming_mouse
the marriage problem algorithm shouldn't apply to this lid problem, at least as stated above, since the "matching" in the marriage problem has to do with stableness with respect to a preference function. the analogy here would be each cup has an ideal lid, but also could be fitted with other lids it doesn't like quite as much. but that's not the case: here each lid matches one and only one cup.
I was pondering a variation of the SMP, which takes away the preference part.

Quote:
ofc this is all probably moot since kato said he needs to clarify the problem.
Now I feel sort of silly for not getting it the first time.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-24-2014 , 11:37 PM
Anyone know anything about deploying rails to a dreamhost shared server? The built in version of ruby and rails are hopelessly out of date, and I'm trying to follow this tutorial to use the newest stable versions, but I just can't get it working. I can get the newest version of ruby and rails installed fine, but then when I generate a test app and try to browse to it, I get a 500 response from the server, and in the error logs I get the following:

Quote:
[Fri Oct 24 20:26:46 2014] [error] [client 24.93.22.1] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-25-2014 , 01:03 AM
Quote:
Originally Posted by daveT
I was pondering a variation of the SMP, which takes away the preference part.
i actually don't think you can do better than n^2 for the problem as originally stated.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-25-2014 , 01:43 AM
^^ true. I was wondering at first if the prof gave one of those back-handed "solve this efficiently, and come see me to collect your PhD" problems.

No matter how many variations I think of, I can't think of a way to not make it n^2 either. I reread the dynamic programming chapter to check my sanity, but found nothing compelling.

If all else fails, just use bogosort.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
10-25-2014 , 10:36 AM
Quote:
Originally Posted by Anais
This is probably a dumb question, but if I pull up a French or Japanese website, why does it look the right way? ...
Not a dumb question at all.


Designing Multilingual Websites
Quote:
For those more inclined towards the front-end design aspect of websites than the ‘behind the scenes’ system-related aspects, consider this technical truism: computers deal with numbers, not letters.

Indeed, letters and other characters are displayed by having a number designated to each one through a system of encoding. Traditionally, there were lots of encoding systems covering different languages, but Unicode changed all that.

Unicode provides a unique number for every character, regardless of platform, program or language. It has been adopted by industry leaders such as Apple, HP, IBM, Microsoft, Oracle, Sun and many others. Importantly, it is supported in most of the common operating systems and browsers. The development of Unicode is one of the most significant global software technology trends in recent years.

Most of the popular web design applications such as Dreamweaver and, for real beginners, Microsoft Front Page, facilitate the development of Unicode web pages.

Unicode can currently be used for over 90 scripts, and has a repertoire of over 100,000 characters. UTF-8 is a variable-length character encoding for Unicode that is familiar to most programmers. It is the best option when creating websites for international markets, as it allows you to use characters from many different languages. For example, German uses the ‘Eszett’ symbol (ß) in place of ‘ss’, whilst three German vowels use the Umlaut (ä, ö and ü).

In short, you’re best using Unicode if you’re planning on adapting your website for other languages.

Unicode Website

Last edited by adios; 10-25-2014 at 10:44 AM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m