• Ever wanted an RSS feed of all your favorite gaming news sites? Go check out our new Gaming Headlines feed! Read more about it here.

Deleted member 11934

User requested account closure
Banned
Oct 27, 2017
1,045
Oh you can also use the Bash on Windows, but as of now I've found it kinda unreliable, with odd issues only pertaining to the Linux subsystem... Just trying to install the official Docker image for WordPress using Linux containers it fails.

I'm using Cmder, that is bundled with some GNU tools and stuff, and it's great
 

The Albatross

Member
Oct 25, 2017
38,985
Throwing another vote onto VS Code. I currently rank my non-IDE code editors in the following order:

1. VS Code
...
5. Atom
6. Sublime
7. Notepad++ and whatever else

VS Code is just so shockingly good and runs so well on every platform. I used to use Atom but goddam it was so slow I gave up on it, it would routinely break silently, crash all of my tabs, memory leaks, etc, but primarily it was just so goddam slow I gave up on it, also project management with Atom was a mess and the project extensions just weren't good. I used to use Sublime before that, but Sublime had so many visual bugs and a major release of sublime would break all of my plugins or themes for days, and so I got into the habit of not updating Sublime ever, which then I was running old clunky software.

VS Code is fast. Fast to launch, fast to do something new. The project management is passive or explicit and it's good, explicit projects always recover correctly and remember where you were. All of the stuff that Sublime brought to common place in a text/code editor (multi-cursor, emmet, preview window, etc) and all toggle-able. Built in support for multiple SCMs, whether it's Git, Perforce, etc, it just works. Nice little terminal/console in there.

I don't think anybody uses Coda 2 anymore, and it's not good. Think the OP could probably be cleaned up and improved, as it looks to be just a copy of what was at Gaf. I mean, under Web Design resources, we've got 6 font services but no mention of Sketch, xD, Zeplin, or the thousands of web design tools that have come out in the last 3 years.
 
Oct 25, 2017
3,789
So my team (global front end team for the organization) sent out a survey to get feedback on how we can improve. A lot of it was negative as to be expected because we are slowly replacing a lot of legacy stuff people are fed-up with other things we had no control over like the build pipeline infrastructure. Plus the team was formed about 2.5 months ago so we have a lot of projects to get going. The one thing we did find out though is that the meanest comments seemed to come from the React fanboys.

- Karma + Jasmine was "ancient" and we need to "get with the program" and be using something modern like Jest. Of course Jest is just a wrapper around Karma + Mocha designed for React.
- Why aren't we using Webpack? Not an unfair question, the build process was built with gulp but we could use webpack if there was enough interest and purpose. What kills me though is that this team did make their own build pipeline with webpack (which is fine by us) but they stuffed all of our global js and css into the bundle, when all other teams just get them from artifacts published to S3. This means that they just added a whole lot of garbage to their bundle when users already have it in their cache. The whole point of webpack is code splitting.
- One guy was all about CSS-in-JS and we're lame for not having it. Okay but CSS-in-JS both slows CSS parse (jsParse -> cssParse -> CSSOM), circumvents the preload scanner, and also keeps the js strings in memory along with the CSSOM. All that performance because you didn't want to write a class?

Like, I get it, Facebook has a really good open-source marketing team and they read some Medium blogs, front-end is confusing but I can't roll my eyes hard enough at how militant they are without understanding their own tools.
 

Zapperino

Member
Oct 28, 2017
258
So my team (global front end team for the organization) sent out a survey to get feedback on how we can improve. A lot of it was negative as to be expected because we are slowly replacing a lot of legacy stuff people are fed-up with other things we had no control over like the build pipeline infrastructure. Plus the team was formed about 2.5 months ago so we have a lot of projects to get going. The one thing we did find out though is that the meanest comments seemed to come from the React fanboys.

- Karma + Jasmine was "ancient" and we need to "get with the program" and be using something modern like Jest. Of course Jest is just a wrapper around Karma + Mocha designed for React.
- Why aren't we using Webpack? Not an unfair question, the build process was built with gulp but we could use webpack if there was enough interest and purpose. What kills me though is that this team did make their own build pipeline with webpack (which is fine by us) but they stuffed all of our global js and css into the bundle, when all other teams just get them from artifacts published to S3. This means that they just added a whole lot of garbage to their bundle when users already have it in their cache. The whole point of webpack is code splitting.
- One guy was all about CSS-in-JS and we're lame for not having it. Okay but CSS-in-JS both slows CSS parse (jsParse -> cssParse -> CSSOM), circumvents the preload scanner, and also keeps the js strings in memory along with the CSSOM. All that performance because you didn't want to write a class?

Like, I get it, Facebook has a really good open-source marketing team and they read some Medium blogs, front-end is confusing but I can't roll my eyes hard enough at how militant they are without understanding their own tools.

One thing I noticed when trying to get into web development is how much marketing and politics there is in this field compared to others.
We have an endless stream of blog posts, podcasts, seminars, and straight up ads telling us we should use this framework instead of this other one and that inevitablymakes some people lose sight of more important questions like: "Do I really need a whole js pipeline to make a static website?". No, you don't, but you can be certain that someone will try to convince you to use react for that.
I'm kind of over it tbh. I understand that I'm not knowledgeable enough to make tens of decisions when building a website, so I'm sticking to higher-level opinionated frameworks, just so I can actually get some stuff done.
 

WanderingWind

Member
Oct 27, 2017
642
Howdy folks. Thanks, in part, to the old thread at You Know Where, I know semi-work in web design. Hope this thread takes off.

Also, VS Code right now is so far above anything else out there. Ain't even close.
 

Kinthalis

Banned
Oct 30, 2017
481
Working with a client that has a pretty complex app in angular 1 using redux. I'm so used ot angular 2+ with ngrx and observables... feels like I'm learning a new language.
 

Aztechnology

Community Resettler
Avenger
Oct 25, 2017
14,134
Ok, I have a lot of html I need to extract inline styles from. It's old code from a professor, and he wants it out of the inline style sheets, and into CSS for our ASP project. Before I go writing a parser for extracting inline styles, does anyone know of one that exists already? I can't find anything, and it seems insane to me that a inline style extract/replace doesn't exist.
 

Deleted member 11934

User requested account closure
Banned
Oct 27, 2017
1,045
Ok, I have a lot of html I need to extract inline styles from. It's old code from a professor, and he wants it out of the inline style sheets, and into CSS for our ASP project. Before I go writing a parser for extracting inline styles, does anyone know of one that exists already? I can't find anything, and it seems insane to me that a inline style extract/replace doesn't exist.
Uhhhh ? http://extractcss.com/
 

Aztechnology

Community Resettler
Avenger
Oct 25, 2017
14,134
What I need extracts any style="(.*?)" tags on a line, creates a new class, iterated, then merges any classes on the line. For instance if it has class="dotted-line" style="padding 0 10px 10px 0" it will extract the "style" tag and containing elements into a CSS style sheet for a new class like example_1, then replace

class="dotted-line" style="padding 0 10px 10px 0"

with something like class="example_1 dotted-line"

Guessing I'll have to write this myself.

I would use something like that, but I'm using partials, with layout pages, so I need a stylesheet and classes that work across multiple pages with the shared layout and maintain my teachers styles for his website. Maybe I'm just an idiot, I'm pretty burnt out right now.
 

Deleted member 11934

User requested account closure
Banned
Oct 27, 2017
1,045
What I need extracts any style="(.*?)" tags on a line, creates a new class, iterated, then merges any classes on the line. For instance if it has class="dotted-line" style="padding 0 10px 10px 0" it will extract the "style" tag and containing elements into a CSS style sheet for a new class like example_1, then replace

class="dotted-line" style="padding 0 10px 10px 0"

with something like class="example_1 dotted-line"

Guessing I'll have to write this myself.

I would use something like that, but I'm using partials, with layout pages, so I need a stylesheet and classes that work across multiple pages with the shared layout and maintain my teachers styles for his website. Maybe I'm just an idiot, I'm pretty burnt out right now.
Oh I see. I'm not used to Asp so I don't know - and it sounds painful there. :/
 

Aztechnology

Community Resettler
Avenger
Oct 25, 2017
14,134
Oh I see. I'm not used to Asp so I don't know - and it sounds painful there. :/

It is. It's a very bad assignment that has nothing to do with learning the framework whatsoever. I would do it manually, but it's a ton of code to go through. So I was looking for a quick and dirty way of just doing a crappy job extracting inline styles. He genuinely doesn't care about performance of anything, just having the styles not inline. Even if I have a class for every line of code.
 

The Albatross

Member
Oct 25, 2017
38,985
What I need extracts any style="(.*?)" tags on a line, creates a new class, iterated, then merges any classes on the line. For instance if it has class="dotted-line" style="padding 0 10px 10px 0" it will extract the "style" tag and containing elements into a CSS style sheet for a new class like example_1, then replace

class="dotted-line" style="padding 0 10px 10px 0"

with something like class="example_1 dotted-line"

Guessing I'll have to write this myself.

I would use something like that, but I'm using partials, with layout pages, so I need a stylesheet and classes that work across multiple pages with the shared layout and maintain my teachers styles for his website. Maybe I'm just an idiot, I'm pretty burnt out right now.

Yikes, sounds very painful. Googling and checking Stackoverflow turned up this tool, CSSOut! https://github.com/cssout/cssout Might be junk, but some people upvoted on stack overflow.

Personally, it might be a time to refactor the site. I think instead of taking a code-based/functional approach to this, you should step back and analyze each page visually, come up with like elements, group them, and then rebuild the pages in a new environment using classes, and then start from that. It'll take longer, but I think you'll inherit less technical debt going forward and start from a stronger base for future optimization.

I'd have to be paid a small fortune to work on this sort of project, good luck.
 

Deleted member 862

User requested account closure
Banned
Oct 25, 2017
8,646
something like

Code:
const styles = {}
const elems = document.querySelectorAll("*[style]");
elems.forEach(function (el, i) {
    let c = "example_" + i;
    let s = el.getAttribute("style");
    if (!styles.hasOwnProperty(s)) {
        styles[s] = c;
    }
    el.removeAttribute("style");
    el.classList.add(c);
});

untested but is this sort of what you're trying to do? This just loops through elements with a "style" attribute, uses that style declaration as the key to avoid dupes and gives it a class name then removes the style and applies the class.

I don't know what you're working with though.
 
Last edited:

Aztechnology

Community Resettler
Avenger
Oct 25, 2017
14,134
Code:
const styles = {}
const elems = document.querySelectorAll("*[style]");
elems.forEach(function (el, i) {
    let c = "example_" + i;
    let s = el.getAttribute("style");
    if (!styles.hasOwnProperty(s)) {
        styles[s] = c;
    }
    el.removeAttribute("style");
    el.classList.add(c);
});

untested but is this sort of what you're trying to do? This just loops through elements with a "style" attribute, uses that style declaration as the key to avoid dupes and gives it a class name then removes the style and applies the class.
Somewhat yea, someone in my group attempted to do this last night I guess, and came somewhat close, but both class and style elements are being overwritten with it, due to how it combines the existing classes. He did a good job last night, just need to figure out how to fix it, so it only overrides the first first found class method per line.

Code:
# Get the Controller / View Name for the file

print "Please enter a controller name: "

controller = gets.chomp

print "Please enter a view name: "

view = gets.chomp



class_prefix = controller + "_" + view



# Get the unholy HTML

heresy_html = File.readlines('heresy.html')



purged_html = ""

unified_html = ""

holy_css_batman = ""



# returns formatted css for file string

def format_css(css, line, prefix)

  stylings = css.split("; ")

  ret_str = ".#{prefix}_#{line} {"

  stylings.each do |style|

    ret_str << "\n\t#{style};"

  end

  ret_str << "\n}"

  return ret_str

end



# merges multiple classes into one class

def format_class(line)

  ret_str = " class='"

  classes = line.scan(/[^-]class=(["'])(.*?)\1/)

  #puts classes.inspect

  classes.each do |c|

    c[1..-1].each do |cc|

      ret_str << "#{cc} "

    end

  end

  ret_str << "' "

  return ret_str

end



heresy_html.each_with_index do | line, i |

  if line.include?("style=")

    # Get style, append to css

    css = line.scan( /style="(.*?)"/ ).flatten[0]

    unless css == nil

      fcss = format_css(css, i, class_prefix)

      holy_css_batman << fcss + "\n"

      # Get purged html line, append to html

      html = line.gsub(/style="(.*?)"/, "class='#{class_prefix}_#{i}'")

      purged_html << html

    else

      purged_html << line

    end

  else

    purged_html << line

  end

end



html_array = purged_html.split("\n")



html_array.each do |line|

  unless line.scan(/\<.*?(class=).*?(class=).*?\>/) == []

    #puts line

    fline = format_class(line)

    rline = line.gsub(/[^-]class=(["'])(.*?)\1/, fline)

    unified_html << rline + "\n"

  else

    unified_html << line + "\n"

  end

end





File.open("output.html", "w") do |f|

  f.write(unified_html)

end



File.open("output.css", "w") do |f|

  f.write(holy_css_batman)

end
 

WanderingWind

Member
Oct 27, 2017
642
Mobile Safari can just suck it. Spent all goddamn morning trying to figure out why position: sticky wasn't working on Safari when it is the only browser to fully support it. Have a polyfill fix on the other browsers, those worked fine. What was worse was it was also not picking up just some of the CSS.

Turns out, I just had to hard clear the cache. Fucking Safari.
 
OP
OP

Deleted member 1726

User requested account closure
Banned
Oct 25, 2017
9,661
Just how exactly do people learn all these frameworks and other things (let's say angular and react as examples) to them get a job in them?

I mean do people get qualified in these at Uni/other place and then seek a job in it or are all these people just self taught then an element of blagging in the door?
 

WanderingWind

Member
Oct 27, 2017
642
I have a question, not sure how to frame it. I have a website I made using Bootstrap. I plan on using WP as my CMS. It's not a blog, but a site that collects recipes. Each post would just be a recipe. Those posts have a headline, image, steps and a sticky sidebar which contains the ingredients.

How the heck do I make a custom post type that allows users to enter data into a list that would then populate that sidebard?

On the backend, ideally it would either be one text entry per item. A text entry for header, steps and then one for the list of ingredients, separated by a return.
 

Wollan

Mostly Positive
Member
Oct 25, 2017
8,811
Norway but living in France

SuperEpicMan

Member
Oct 25, 2017
1,807
Im currently doing a mini project for an interview where I basically need to create a dynamic bar chart using only CSS. So far I have been trying to use some CSS trickery to achieve what I want, but I am hitting a bit of a wall.

CodePen

Basically I want to be able to add a solid white border-top of 5px to the an individual bar when you click the buttons, as well as making the div appear with more information. However, I have read that typically you can only select related elements with pseudo classes, so i'm wondering if there is a way around this?
 

Deleted member 862

User requested account closure
Banned
Oct 25, 2017
8,646
are you allowed to change the html? If you move the checkbox associated with the labels you could use the checkbox hack. It needs to be higher in the source order though so you can do something like #defensive-checkbox:checked .defensive-info
 

SuperEpicMan

Member
Oct 25, 2017
1,807
Yeah its all stuff I have wrote so far. I have updated the pen since I posted it since I rebuilt it using CSS Grid. It is getting much closer to how I want it to look, though, for some reason it won't let me add a 5px solid white border onto the top of my active bars for some reason :/
 

SuperEpicMan

Member
Oct 25, 2017
1,807
The bars in the example image they sent me are also curved on the top, though I might make that a stretch goal lol

IbdSTSq.png
 

SegFault

Member
Oct 25, 2017
1,939
vscode or bust

also finally getting a proper virtual machine set up for development.

anyway time to play around with a headless drupal 8 site with angular for funsies.
 

SuperEpicMan

Member
Oct 25, 2017
1,807
Just to update from my last post here, I managed to get the borders working and submitted it.

Updated Codepen

For some reason the pseudo selectors were only affecting html elements below the buttons. So it was just a case of reordering the html code so that the buttons were above everything else. The layout was done using CSS Grid so it moving the html around made no difference to how it was rendered.

Anyway, they liked what I made and want to see me again for a final interview. That being said they did offer a couple of points of feedback, which I want to address before going into the interview.

1. The site is broken in Internet Explorer, browser testing is an essential part of the front end development process.

2. The button active state functionality is inconsistent.

Point 1 is to be expected, since CSS Grid isn't supported in IE. With point 2 I think I need to make it so that if the user selects any button, the other buttons states are reset, but the preceding buttons have the green background too.

If anyone has any ideas of where I can had with this, it would be really appreciated.
 

SuperEpicMan

Member
Oct 25, 2017
1,807
With some help from Stack Overflow, I have updated the inputs to radio buttons which addresses Point 2, I have also included some support for older browsers, though I can't quite test them properly since I don't have a windows machine.
 

Kinthalis

Banned
Oct 30, 2017
481
Hey guys I'm going to Ng Atlanta later this month. Going to one of the workshops, unfortunately I can't attend the 2 day conference part. So if anyone is looking for cheap tickets to the 2 day conference hit me up.
 

SOLDIER

One Winged Slayer
Banned
Oct 26, 2017
11,339
Between all the different development careers (web development, video editing, photoshop, etc), which one typically pays the best and has the healthiest job market?

Aggressively trying to narrow my choices down so I can decide what computer-based thing to focus on.
 

Kinthalis

Banned
Oct 30, 2017
481
Those are pretty different careers. Video editing I know nothing about. With photoshop, etc I'm assuming you mean graphic design? I believe it's a fast growing career path. I would recommend including UI/UX to broaden your opportunities.

Web development typically means programming and application development. If you can do design AND engineering, that's worth a lot in the industry right now.
 

Deleted member 11934

User requested account closure
Banned
Oct 27, 2017
1,045
UI/UX is a pretty cool environment, I got a degree in that and there are plenty of options and people are hiring. But being a creative environment, it's also very competitive. My suggestion is to get good at JavaScript (Angular, React, Vue, just pick something here Web Developer Roadmap 2018) and at UX, and you shouldn't have problems getting a job. But don't focus only on engineering, learn about interaction design.

Graphic design is hard and not paid as well.
 

Kinthalis

Banned
Oct 30, 2017
481
Hey guys is there an equivalent to angular for back end development?

With equivalent I mean something with a large following, comprehensive docs, opinionated about its structure, and everything you need out of the box. Bonus if it's easy to get up and running with typescript or es6.
 
Oct 27, 2017
3,586
Hey guys is there an equivalent to angular for back end development?

With equivalent I mean something with a large following, comprehensive docs, opinionated about its structure, and everything you need out of the box. Bonus if it's easy to get up and running with typescript or es6.

I think I've recommended it before in this thread, but Firebase is probably the way to go if you want a one-stop shop for all your backend needs and don't want to implement all the plumbing yourself. You'll probably migrate away from it in time (the lack of a relational data store is the big one for me), but it's a good starting point.
 
Oct 25, 2017
3,789
Hey guys is there an equivalent to angular for back end development?

With equivalent I mean something with a large following, comprehensive docs, opinionated about its structure, and everything you need out of the box. Bonus if it's easy to get up and running with typescript or es6.

For C#: .net MVC
For Ruby: Rails
For Python: Django
For Node: Sails (Express is the de-facto for node and sails is built on top, but express is no opinionated). You can run node with typescript too.
For Java: Spring
 

Martal

Member
Nov 10, 2017
12
Hi all! Im teaching myself web development and I think I have reached my first plateau. I am finding it very difficult to gauge the progress that I have made and the level I am at.

I have a hard time working up the courage to apply for junior positions or internships. I have made a portfolio site (http://martpart.eu/) and a few projects on Github/Codepen but its all very trivial and, I think, uninteresting to employers.

Could anyone maybe shed some light on what could I try to add to my portfolio to make it more attractive? Do employers really want to see mock landing sites for non existant companies or are they looking for something more?
 

Kinthalis

Banned
Oct 30, 2017
481
Make a passion or hobby project or two. Contribute to an open source project on github. Or several. These things will show employers you are serious about development and you can work with others.

Maybe see if you can land a freelance project and ask if you can put it up in you portfolio site.
 

SOLDIER

One Winged Slayer
Banned
Oct 26, 2017
11,339
I'm assuming you mean graphic design? I believe it's a fast growing career path.

Graphic design is hard and not paid as well.

Mixed opinions here.

UI/UX is a pretty cool environment, I got a degree in that and there are plenty of options and people are hiring. But being a creative environment, it's also very competitive. My suggestion is to get good at JavaScript (Angular, React, Vue, just pick something here Web Developer Roadmap 2018) and at UX, and you shouldn't have problems getting a job. But don't focus only on engineering, learn about interaction design.

When you say it's competitive, do you mean as in getting hired, or keeping the job?

I'm curious how these kinds of creative environment jobs work. Do you still work on a fixed schedule, or is it more contractual? Are you paid by the hour or by the completed work?

Basically, I'm trying to decide between the IT/Security field or the Engineering/Development field. The latter would probably interest me more, since you seem to have more creative freedom, whereas the former is more customer serivce-based. However, I do prefer a fixed schedule where I don't have to worry about each paycheck (i.e. commission), so I'll need to inquire further about both.

Also, what would be the best entry-level method to getting into the development field? Are degrees necessary, or is it better to get an entry level job so you can build up the experience to show off to bigger companies?
 

WanderingWind

Member
Oct 27, 2017
642
If you want surefire money, go security. Truth be told, there will always be a market for web designers and developers, but crap like Wix is eating into the market. Who knows what that stuff will look like in 4-5 years. Meanwhile, everybody still needs security and the government will always need people at Cyber Command to fill roles in national defense (assuming you're American, if you're not then nevermind that last).

Designers can absolutely make money, but if you're concerned about a steady paycheck - short of getting independently wealthy I can think of no more surefire way of making bank than working in IT/security. It may not always be the glamorous job, but as a dude pushing 40, let me tell you, the window for giving a fuck about how sexy your job is is reeeeeaaaaal small. And you don't want to be a struggling artist at my age.

Go get paid.
 

Deleted member 11934

User requested account closure
Banned
Oct 27, 2017
1,045
Mixed opinions here.



When you say it's competitive, do you mean as in getting hired, or keeping the job?

I'm curious how these kinds of creative environment jobs work. Do you still work on a fixed schedule, or is it more contractual? Are you paid by the hour or by the completed work?

Basically, I'm trying to decide between the IT/Security field or the Engineering/Development field. The latter would probably interest me more, since you seem to have more creative freedom, whereas the former is more customer serivce-based. However, I do prefer a fixed schedule where I don't have to worry about each paycheck (i.e. commission), so I'll need to inquire further about both.

Also, what would be the best entry-level method to getting into the development field? Are degrees necessary, or is it better to get an entry level job so you can build up the experience to show off to bigger companies?

As in there is lots of beginners in the field, so you really need to specialize and stand out - or have a very comprehensive view of the industry so you can work with different tools per project - and it's intrinsecally a creative environment because right now web development is still not a very formal industry. We're in the middle of a revolution since some years, as more and more companies move to agile and CI/CD and adopt JavaScript end to end, even though PHP, Ruby, etc. are still very relevant or used in combination with JavaScript. Lots of people make websites with basic PHP competence, so the low end of the market is basically an hell right now. Higher level design (as in UX and UI for other industries, in which you're probably working as much for internal users as the public) is well paid, and there are many agencies in the field paying good money and companies looking for them. I've had an experience last year in an agency where they were specialized in that and did commissions for a bigger design group while still making websites, and the money was gooood. You definitely will find full time employement being offered both in startups and agencies, though it also depends on where you're located. Freelancing is hard as fuck (and you should get experience before getting into that).

I don't know shit about IT/Security so I can't compare with that. You definitely don't have to work with clients directly if you're a developer, sometimes you might have to educate the end user, but it's a job for designers.If you're freelancing that's expected, but many developers work in tandem with designers.

About graphic design - my degree is kinda in that? I've studied that together with UI and stuff like that. And knowing from friends and mates, getting a job in graphic design is hard and paid less because a developer sounds like a "real job" while graphic designers are still treated like "artists", so expect offers just for fame and your work getting cloned. There is also lots of kids doing nice pixels around (see dribble or behance) instead of real, human, user-oriented design. People still get jobs and internships, really, but it's a cutthroat environment.

I had the great idea of studying design, which is great for user experience and applications and stuff, then went back doing development (studied by myself, starting with PHP and moving to Node/React). You'll find amazing resources on the internet. You defintely don't need a degree, having properly written code and a variety of experiements to show up (and why not? some mockups and websites) is cool with employers. You need to prove them you're good at writing code and dealing with source versioning, collaborating (look at how open souce projects work on github for example), getting around issues by using good old Google and Stack Overflow. Don't forget that programming is a mindset, while languages are just ways to express it and getting fluent in it only takes time, but not hard by itself. And I'm also shit at maths so if you hate it you'll need not to worry too.

If you want surefire money, go security. Truth be told, there will always be a market for web designers and developers, but crap like Wix is eating into the market. Who knows what that stuff will look like in 4-5 years. Meanwhile, everybody still needs security and the government will always need people at Cyber Command to fill roles in national defense (assuming you're American, if you're not then nevermind that last).

Yeeeah Wix is shit. But there is always need for developers for webapps and such, and designers for the UX. It's the little guys doing web design, and only web design (possibly with WordPress) that are getting fucked hard if they don't have serious clients.
 

SOLDIER

One Winged Slayer
Banned
Oct 26, 2017
11,339
If you want surefire money, go security. Truth be told, there will always be a market for web designers and developers, but crap like Wix is eating into the market. Who knows what that stuff will look like in 4-5 years. Meanwhile, everybody still needs security and the government will always need people at Cyber Command to fill roles in national defense (assuming you're American, if you're not then nevermind that last).

Designers can absolutely make money, but if you're concerned about a steady paycheck - short of getting independently wealthy I can think of no more surefire way of making bank than working in IT/security. It may not always be the glamorous job, but as a dude pushing 40, let me tell you, the window for giving a fuck about how sexy your job is is reeeeeaaaaal small. And you don't want to be a struggling artist at my age.

Go get paid.

I don't want to be a struggling artist EVER, heh.

Ultimately that's what it comes down to. If IT lets me own a house, then I can deal with angry customers or what-have-you. As long as it's not like my job is determined by surveys or quotas (two things I had to suffer with when I was at American Express and Amazon, respectively), then I could care less how unhappy they are.

Plus, from the info I'm getting in another thread, it sounds like I can land a job in the IT field now without having to go back to school, minus some certs or licenses, depending. If the same can be said for the web development side of things, then I'll still consider that a strong possibility. But at the end of the day I'm siding with whichever field pays the most and is also the most secure.
 
OP
OP

Deleted member 1726

User requested account closure
Banned
Oct 25, 2017
9,661
Anyone able to offer some help as to loops on the code below (hopefully it's enough to go on):

Basically I have another line of code I need to add to get a third level of navigation at the point of <---- add code at this point, now the code works correctly and outputs my child item, but it adds it to all the other elements too, of which there is 5 in this instance, so I get this:

Menu item
--Sub Item
---Final Sub Item
--Sub Item
---Final Sub Item
--Sub Item
---Final Sub Item
--Sub Item
---Final Sub Item

Instead of

Menu item
--Sub Item
--Sub Item
--Sub Item
---Final Sub Item
--Sub Item

Now I know it's to do with the positioning of the code in the foreach loop but how else do I close off the loop on the other list items whilst also embedding the required child <ul<li></li></ul> elements? Is it feasible through this method? I'm starting to think not.

thanks for any help, I know it's a tricky one to understand.

Edit: Gah, how can I post PHP code, even when using the code feature I get an error saying the site cant be accessed because I'm posting dodgy code.
 
Oct 27, 2017
3,586
It's hard to say without seeing your code, but you likely need to add some sort of test to the loop where you're adding the 'final sub item', and skip over it if it's not required for that particular 'sub item'. I presume this is an exercise question?
 
OP
OP

Deleted member 1726

User requested account closure
Banned
Oct 25, 2017
9,661
Nope, it's work related.

Annoyingly I can't post the code as it just says error when I hit submit.

I have pasted the code on pastebin which you can see here

https://pastebin.com/nXn2Y0qF

The first foreach loop generates the second level of navigation, and the second one gets the sub items. I have code working to get a child element of this second level, but when I put the same code as on line 11 but starting if(!empty($childitem['items'])) { etc inside the loop on line 20 (as the code above it) and the rest of my code it just adds it to all second level navigation and I can't work out why it's doing that for that loop and not the previous loop.
 
Last edited: