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

07-26-2016 , 11:23 AM
now that I think about it I guess it doesn't really matter but thats the way its done traditionally. to be frank its pretty hard to sift through that gist with the weird way you name variables and format code.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 11:39 AM
yeah, the variable names can be a bit better.

The formatting sucks because I use emacs and don't have it set up for multi-language mode. Rather just make the JS external, but just trying to get it to work atm. I fixed the formatting via whatever emacs considers proper JS mode and updated the gist. Not sure it helps at all.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 01:55 PM
Works fine for me.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 03:01 PM
Quote:
Originally Posted by daveT
Quote:
Originally Posted by txpstwx
Works fine for me.
Works fine for me too. Tried Chrome and Edge.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 03:23 PM
I tried it and it didn't work for me. Linux/Firefox 46.0.1 Maybe a browser issue?. For me, on first initial page load, inputting the data, pressing the "generate bar codes" button generates the bar codes with 24px width. After clicking the reload current page button in firefox, and clicking "generate bar codes" again the bar codes div=img style=... changes to 112px. Its as if css and js is not "initialized" until a first submit and followed by a "reload current page". Not sure how to fix it, i tried to reload the page once on load using js but didn't help.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 03:36 PM
It's a lot easier to write using jQuery. Maybe it would help to deal with cross browser issues.

https://dl.dropboxusercontent.com/u/...8/barcode.html
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 05:34 PM
Quote:
Originally Posted by a12
I tried it and it didn't work for me. Linux/Firefox 46.0.1 Maybe a browser issue?. For me, on first initial page load, inputting the data, pressing the "generate bar codes" button generates the bar codes with 24px width. After clicking the reload current page button in firefox, and clicking "generate bar codes" again the bar codes div=img style=... changes to 112px. Its as if css and js is not "initialized" until a first submit and followed by a "reload current page". Not sure how to fix it, i tried to reload the page once on load using js but didn't help.
Maybe it is only FF on Linux... seems to be okay on Chrome, now that I've checked.

Quote:
Originally Posted by txpstwx
It's a lot easier to write using jQuery. Maybe it would help to deal with cross browser issues.

https://dl.dropboxusercontent.com/u/...8/barcode.html
I'm getting all small barcodes on this one when using FF, but they are normal-sized with Chrome.

Is it possible that FF is making an error on the initial load and the small is the "correct" style it is looking for?

Last edited by daveT; 07-26-2016 at 05:42 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 05:45 PM
Oh yeah, it draws small for me in Firefox - even on the first load. Haven't dug into it, but something to do with the img styles. If I remove max-width: 100% they draw OK in Firefox.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 05:55 PM
Yeah max-width no good for firefox:

https://developer.mozilla.org/en-US/...port/max-width
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 06:20 PM
Quote:
Originally Posted by da_fume
Yeah max-width no good for firefox:

https://developer.mozilla.org/en-US/...port/max-width
I think it's just plain css max-width being applied, not the @viewport property. https://developer.mozilla.org/en-US/.../CSS/max-width

I think the problem has to do dynamically adding images and immediately using the clientWidth property. In Firefox, the img doesn't have its full width right away unless you use the exact same input values and it pulls from cache. Example:

Code:
mf.addEventListener("submit", function(e) {
    e.preventDefault();
        var ttl = document.getElementById("ttl").value;
        var code = document.getElementById("code").value;
        var cnt = document.getElementById("cnt").value;
        var imgDiv = document.getElementById("imgs");
        var newImgClass = "barcode" + code;
        
        for (var i = 0; i < cnt; i++) {
            var newTitlePar = document.createElement("p");
            newTitlePar.setAttribute("style", "margin-bottom:0");
            var newImg = document.createElement("img");
            var br = document.createElement("br");
            
            newImg.className = newImgClass;
            
            newTitlePar.textContent = ttl;
            
            imgDiv.appendChild(newTitlePar);
            imgDiv.appendChild(newImg);
            imgDiv.appendChild(br);
            newTitlePar.style.textAlign = "center";
        }
    
    JsBarcode("." + newImgClass, code, { fontOptions: "bold", });
    
    console.log('clientWidth immediate: '  + newImg.clientWidth);
    
    setTimeout(function () { 
        console.log('clientWidth delayed: '  + newImg.clientWidth);
        var w = newImg.clientWidth;
        imgDiv.setAttribute("style","width:" + w + "px"); 
    }, 1000);
});
On Chrome, the output is
"clientWidth immediate: 112"
"clientWidth delayed: 112"

On Firefox, it's
"clientWidth immediate: 24"
"clientWidth delayed: 112"

Here's a pen: http://codepen.io/anon/pen/RRJGVQ
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 07:00 PM
Makes sense. If the barcode library has the text centered on the barcode, there must be some way to make that work correctly for the top text also, right?

Not home right now, so can't test anything. I think I'd like to use the jQuery version. Nice catch on the whitespace.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 07:06 PM
If you switch it from an image element to canvas, it works in FF for me. I updated my link above.

This works too:

function setBarcode(className, code, callback){
var bc = JsBarcode(className, code, {
fontOptions: "bold",
});

callback(bc._renderProperties[0].element.width);
}

function setImgDivWidth(width){
$('#imgs').width(width);
}

$('#mf').submit(function (e) {
e.preventDefault();
...
setBarcode("." + newImgClass, code, setImgDivWidth);
...
});

Last edited by txpstwx; 07-26-2016 at 07:35 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 10:35 PM
Quote:
Originally Posted by Benholio
I think it's just plain css max-width being applied, not the @viewport property. https://developer.mozilla.org/en-US/.../CSS/max-width
Oh durr, my mistake, sorry for sidetrack.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 10:38 PM
Quote:
Originally Posted by txpstwx
If you switch it from an image element to canvas, it works in FF for me. I updated my link above.

This works too:

function setBarcode(className, code, callback){
var bc = JsBarcode(className, code, {
fontOptions: "bold",
});

callback(bc._renderProperties[0].element.width);
}

function setImgDivWidth(width){
$('#imgs').width(width);
}

$('#mf').submit(function (e) {
e.preventDefault();
...
setBarcode("." + newImgClass, code, setImgDivWidth);
...
});
hey, thanks a ton. You're version is much cleaner than mine too.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-26-2016 , 10:48 PM
Quote:
Originally Posted by da_fume
Oh durr, my mistake, sorry for sidetrack.


'Max-width Firefox' was the first thing I googled because I suspected something like that. Wouldn't have been surprised.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-28-2016 , 01:19 AM
Quote:
Originally Posted by Larry Legend
had a UI/UX developer at a client site for a 3 month contract. ... Fast forward to the end of the contract, I get a frantic call from their HR person. They asked him for a 3 month extension because the project was continuing, and he said no, that he lined something else up. Which is technically completely in his right, but kinda dickish.
I'm new here, as I have just recently migrated from full-time employment to contracting/consulting. There's a lot of good info ITT. But in this case, can you explain in a little more detail why moving on is "dickish"?

I will partially agree with you if the company requested the extension with a month or more still remaining on the original contract. But otherwise, what is expected of the contractor? To wait until he's unemployed before looking for other work? Once the finish line is in sight (i.e. within 4 weeks), of course the contractor is going to start lining up his next gig. Given that you say "a frantic call," it sounds like this all happened within the final week or two of the contract.

Further, this company wasn't asking for a 2-week extension, where the contractor could push his next gig back a bit... they were asking for a full renewal of 3 months added on to what was originally 3 months. I just can't see how the initial company could expect the contractor (if he is competent at all) to NOT have another gig lined up and to NOT have any other obligations for 3 full months.

This appears more like disorganized project management (writing a 3-month contract for a 6-month+ gig) combined with typically clueless and entitled HR (why would anyone want to work anywhere but here?). Did they offer to increase his rate for the extra 3 months?

I agree completely with you on the Hawaii thing, billing 60 hours while on vacation is bullsh;t. But HR didn't seem to mind that, given they were desperate to retain his services. The contractor being organized, ambitious, and lining up subsequent gigs doesn't seem dickish at all.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-28-2016 , 01:25 PM
Quote:
Originally Posted by FrootLoop
I'm new here, as I have just recently migrated from full-time employment to contracting/consulting. There's a lot of good info ITT. But in this case, can you explain in a little more detail why moving on is "dickish"?
I didn't think it was dickish either but I thought I might not have inferred something wrong from that.


Quote:
I will partially agree with you if the company requested the extension with a month or more still remaining on the original contract.
To me it is a matter of reputation and such. I mean contractors can typically be fired on the spur of the moment and I have seen it happen more than once. So it to me it works both ways. If the client has you penciled in for the duration of the contract and everyone is happy with the work product then yes see it through by all means. A three month contract is short and clients should have no expectation of loyalty if a better gig comes along. An 18 month contract is a different situation.

Quote:
But otherwise, what is expected of the contractor? To wait until he's unemployed before looking for other work?
This should never be the expectation. And when I have contracted I have been extremely fortunate in the client company keeping me posted on when my services would not be needed thus providing we with time to find another gig.

Quote:
Once the finish line is in sight (i.e. within 4 weeks), of course the contractor is going to start lining up his next gig. Given that you say "a frantic call," it sounds like this all happened within the final week or two of the contract.

Further, this company wasn't asking for a 2-week extension, where the contractor could push his next gig back a bit... they were asking for a full renewal of 3 months added on to what was originally 3 months. I just can't see how the initial company could expect the contractor (if he is competent at all) to NOT have another gig lined up and to NOT have any other obligations for 3 full months.

This appears more like disorganized project management (writing a 3-month contract for a 6-month+ gig) combined with typically clueless and entitled HR (why would anyone want to work anywhere but here?). Did they offer to increase his rate for the extra 3 months?
Right and the company was certainly free to offer more than a 3 month contract. They could have also perhaps negotiated a direct position for them. Lots of options available.

Quote:
I agree completely with you on the Hawaii thing, billing 60 hours while on vacation is bullsh;t. But HR didn't seem to mind that, given they were desperate to retain his services. The contractor being organized, ambitious, and lining up subsequent gigs doesn't seem dickish at all.
It isn't dickish, it is perfectly reasonable.

My biggest problem with contracting is that I think rates are too low tbh for the most part. But like I stated, I have been extremely fortunate with client companies in how I have been treated. I am getting completely inundated with about contracting opportunities and some direct opportunities.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-28-2016 , 02:51 PM
Well the new side job seems to have some political ramifications and aspect of me having to wrestle things to do out of existing employees - just like my day job! Apparently there's already some guy who has a whole node framework designed.

The way the job was pitched to me was they wanted me to come in and create a scalable node framework for them. I suspect they have doubts about what he's doing, but don't want to come out and tell him. The email that went out to the dev team is more like "hey let's show suzzer what you're doing and see how we can work together". Mean time the existing guy is playing very hard to contact. Awesome! I guess I need to take a 3rd job so I can have something to freaking do.

The little 3-day project I did for maxtower involved 10x more coding and other tech tasks than the last 6 months at both of my jobs.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-28-2016 , 03:01 PM
I just sent this to my boss at the day job btw. So at least I am trying. I'm already sick of having nothing to do all day and am having a hard time motivating myself to do POCs that no one cares if I finish or not.

I'm interested in any feedback.

Background is he sent out this email:

Quote:
Good afternoon Folks:

As you’ll recall, earlier this year we discussed the topic of One Personal Thing – Essentially identifying one thing that will most significantly improve your personal job satisfaction.

It could be a thing that relates to Work/Life Balance, work-time preference, working methods, work location flexibility/preferences, inter-personal/org communication preference, or other aspects of personal job satisfaction that would have the most impact on your job satisfaction.

ACTION REQUESTED: I would like to gather from you, Your One Personal Thing, via email by EOD Thursday, August 4th - Please email your response to me only (no copying anyone else’s answers J).

We’ll discuss the One Personal Thing on each of our 1x1’s the week after.
To which I replied:

Quote:
Hey [boss], my thing is easy. I would like to get more hands on with node, docker and other emerging technologies. Right now the [only project I'm sort of working on] node initiative is moving forward but the technical evaluation part is stalled until Hazelcast updates their node client. I am working with xxx (the xxx product) which is interesting [it's not]. Every thing else is either helping out at my old job to get the [old project with previous role] release out the door this year, stuff like the Javascript evaluation I mentioned, or a POC that I’m doing for my own edification. I like doing POCs, but you never learn as much as when you have an actual business problem with concrete requirements.

To be honest it’s a little frustrating to me that there seem to be node projects going which I am not involved in. I thought “the node guy” would be one of my primary roles. I have directly contacted most of the members of our team on IM and offered to help with anything they need. So I am trying to be proactive and volunteer to help whenever possible. It just seems like most people have their own self-contained corner of the world right now, and maybe it will take a while for new things to come up that I can work on.

I also really want to get involved on the docker side. I believe DevOps is going to be a more and more crucial role going forward, and I am very interested in all aspects of it. I would love to shadow someone like James or Nate and learn what they do.

At my age I worry about getting out of the hands-on mode for too long. I presume it will be harder and harder to get back in the older I get. Being hands-on is the reason I was drawn to programing in the first place, and gives me a great amount of job satisfaction.
50/50 chance he'll pretend he never got it, based on his usual pattern.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-28-2016 , 06:49 PM
Quote:
Originally Posted by suzzer99
I just sent this to my boss at the day job btw. So at least I am trying. I'm already sick of having nothing to do all day and am having a hard time motivating myself to do POCs that no one cares if I finish or not.

I'm interested in any feedback.

Background is he sent out this email:



To which I replied:



50/50 chance he'll pretend he never got it, based on his usual pattern.
Hmmm.....
Generally speaking this is too negative in my view and too unfocused. He asked for one thing didn't he? You are venting
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-28-2016 , 08:19 PM
One thing. Give me something to ****ing do.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-28-2016 , 09:01 PM
Quote:
Originally Posted by suzzer99

The little 3-day project I did for maxtower involved 10x more coding and other tech tasks than the last 6 months at both of my jobs.
No office politics and welcomed product design inputs! Who wouldn't want to work for me?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-28-2016 , 10:48 PM
I can't speak to the on-the-ground specifics, but the way it was relayed to me was that they told him they would be extending him for 3-6 months because the project needed more work, and he didn't give any indication he wasn't down with continuing.

I found out afterwards he was considered to have a pretty odd personality and was at times abrasive and rude, but he could get the job done so they rolled with it.

I think him leaving this project right at the end of the contract without accepting an extension was a "**** you" to the people he wasn't getting along with. It was definitely viewed that way and seemed to be his motivation to leave when he did + the hawaii thing. He apparently didn't like the Director of Engineering he reported to.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-28-2016 , 11:32 PM
Quote:
Originally Posted by maxtower
No office politics and welcomed product design inputs! Who wouldn't want to work for me?
And actual requirements! Written down even! I didn't have to guess what you need based on a few vague sentences.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
07-29-2016 , 01:32 AM
Why don't you start playing with docker?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote

      
m