Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
prom candy
Dec 16, 2005

Only I may dance

pipes! posted:

Don't use HAML, if you can. It's temperamental, difficult to troubleshoot, and overly strict (and this is coming from someone who has a serious boner for web standards).

HAML is great, where did you get this idea?

Adbot
ADBOT LOVES YOU

prom candy
Dec 16, 2005

Only I may dance

pokeyman posted:

Are you using notepad.exe or something?

Having a whitespace-aware language with no closing tags is more readable no matter what text editor you're using.

prom candy
Dec 16, 2005

Only I may dance

pipes! posted:

From using Slim instead.

Okay yeah Slim is pretty great. I'm actually not sure why I haven't switched to it considering I've been using Emblem to work on Ember projects. One thing I have noticed with HAML is that elements with lots of data-tags-with-hyphens get ugly pretty quick when you end up with something like

code:
  %div{ data: { modal: { remote: '/my-modal-path', clone: true }, tooltip: { title: 'My tooltip' } }
The Slim sytax of

code:
 div data-modal-remote='/my-modal-path' data-modal-clone=true data-tooltip-title='My Tooltip'
Is about the same amount of typing but it's easier to get a look at your data attributes.

prom candy
Dec 16, 2005

Only I may dance
Yup, they're exactly the same.

prom candy
Dec 16, 2005

Only I may dance

EB Nulshit posted:

So slim is basically HTML but with Python-style white-space rules to obviate the need for braces? I'm okay with that.

The thing I like more about the white space rules is that it makes it really easy to understand the flow of the document at a glance and eliminates the need to have closing tags. I know most modern text editors are pretty good at managing your closing tags but one little slip up can leave you with a frustrating debugging experience. Especially since different browsers will try to comp for missing or extra closing tags in their own way.

prom candy
Dec 16, 2005

Only I may dance

I don't remember the specifics since I haven't had to deal with closing tags on a regular basis in a very long time, but issues like this that I found while Googling were never fun to debug: http://stackoverflow.com/questions/5623109/firefox-automatically-adding-closing-form-tag-too-early-ie-and-chrome-ok

prom candy
Dec 16, 2005

Only I may dance

fuf posted:

gently caress me is there some universal law that if you make a website for someone they will only ever look at it on IE8? :negative:

Make browser support clear in your estimate/contract.

prom candy
Dec 16, 2005

Only I may dance
Why all the Django recommendations and no recommendations for Rails? I always thought Django was fairly unpopular compared to Rails, am I so out of touch?

prom candy
Dec 16, 2005

Only I may dance

Thermopyle posted:

You're out of touch.

What's the deal with Django? I haven't read much about it since about 2007 or 2008. Why is everyone excited about it?

prom candy
Dec 16, 2005

Only I may dance

Whalley posted:

This isn't really a question or anything, but I've just started learning Angular.js and holy poo poo I've got half a dozen projects that would have been so easy to complete had I learned this earlier. Angular.js is so fuckin' nice.

I'm finding the same thing with Ember. Two-way data binding is so much nicer than loving around with events.

prom candy
Dec 16, 2005

Only I may dance

obstipator posted:

Be careful with Ember. Last I heard the next version is going to change a lot. Also all the stackoverflow answers from over a few months old are now obsolete, so make sure you check for the newest answers. IIRC, they were the ones that requested that SO remove all their old questions and answers.

Yeah I've been using Ember for a couple of months now and there is a LOT of outdated information out there. It reminds me of when Rails was new and undergoing a lot of change. Luckily the official Ember guides are really good.

What's the deal with React? What's it good at that Ember and Angular are bad at?

prom candy
Dec 16, 2005

Only I may dance

Thermopyle posted:

Being fast. The way it makes you think about your apps. It's conceptually small, so easy to understand. Documentation.

People keep saying it's really only about the view layer though, how does that translate into building a more traditional web application? Does it concern itself with pulling data from an API at all? Saving changes to a database?

prom candy
Dec 16, 2005

Only I may dance

ZentraediElite posted:

Asked this question in Creative Convention and got redirected here...

I'm trying to get a better understanding of what I would need for putting together a simple website for my father's business. He runs a small independent motel. I'm envisioning a simple landing page with contact information, a picture or two of the property, some simple driving directions, and maybe a description of local attractions.

I've looked at Squarespace, but it seems like it might be more than what we need. I haven't done any legitimate HTML work in ages, so I don't think building something from scratch makes sense.

What do you all think?

If you're technically proficient enough to set up shared hosting and use FTP and you've got some outdated experience with HTML and CSS you might be able to buy a theme from somewhere like ThemeForest and then tweak it to your liking. Otherwise I would just go with Squarespace.

prom candy
Dec 16, 2005

Only I may dance

Power Ambient posted:

SquareSpace is just fine and probably even better for a novice than even something like WordPress. Unless that involves a shopping cart althought you can always make the nav direct to another site with cart software like Shopify or BigCartel.

Doesn't Squarespace have some cart stuff now?

prom candy
Dec 16, 2005

Only I may dance
I'm doing a site for a client that has a lot of videos, I'm looking for a player that has the following features. I don't care if this is an embedded SaaS thing like Vimeo Pro or something that's totally self-hosted and self-managed. I just need it to be able to do the following stuff:

* Flexible advertising preroll, not necessarily with ad tags but with my own videos
* At least some branding/skinning features (watermark, etc.)
* Embeddable (I can probably work this out myself with iFrames)
* Works on all major devices/browsers

Free is nice, but paid is not a problem. It just needs to be really solid. Any suggestions?

prom candy
Dec 16, 2005

Only I may dance

Maluco Marinero posted:

I haven't used these guys yet, but I believe http://wistia.com/ is intended to cover your kind of use case, less about social video, more about embedded video and tools to help you get done whatever you need for that.

This looks really good, thank you!

prom candy
Dec 16, 2005

Only I may dance
edit: nvm

prom candy fucked around with this message at 19:36 on Apr 13, 2018

prom candy
Dec 16, 2005

Only I may dance

jiggerypokery posted:

Anyone recommend any books for backend developers who live on the command line and want to pretend to have an opinion on design and UX?

The Non-Designers Design Book is really good.

prom candy
Dec 16, 2005

Only I may dance
Like most things, I think the wise approach for the average working developer is going to be to wait for larger organizations to figure a lot of this stuff out. I don't think I've ever been served well by super early adoption of something on the web unless it's the only way to satisfy a business requirement.

prom candy
Dec 16, 2005

Only I may dance
Just to add to my previous comment, if you're interested in webass then absolutely follow it and gently caress around with it, but don't feel like you need to be gearing up to build production apps in it in order to stay relevant in your career. Not yet anyway.

prom candy
Dec 16, 2005

Only I may dance
I recently switched to working for a product after 10 years of agency work. I was in management at the agency (as well as being a dev) and did everything I could think of to improve processes but you can never get rid of the client factor or the budget factor. I know there are better people than me who have probably made things smoother at their agencies but for me working on one product has been a breath of fresh air. I doubt I would return to agency life unless I could be promised not to work on more than 2 projects per year. The grind from project to project is exhausting.

prom candy
Dec 16, 2005

Only I may dance

melon cat posted:

I have a client who's opening up a spa and I'm exploring the best CMS for them. What's the best CMS for someone who wants easy appointment booking functionality with an online store (selling lotions and stuff)? WordPress is my usual go-to, but this client really wants a hands-off approach to their website and I don't think WordPress is the best choice for them. The only involvement they want in operating the website is changing their online store items from time-to-time. As much as I like WP it just isn't as user friendly and maintenance-free as I'd like it to be. Leaning towards Shopify, but not sure how well they do appointment booking functionality.

Why not just sell them a monthly maintenance package and do the updates for them? If they're not savvy you may end up doing the same amount or more work in support.

prom candy
Dec 16, 2005

Only I may dance

nexus6 posted:

Thanks for the responses. I'm keen to learn more specifically about what 'product work' entails - is it like there's only one large site/app you work on and different teams do different features/bugfixes or something? Is it like having only 1 project with 1 client? I'm not very good at visualising what the job is like.

How does it work with constantly emerging web technologies? In agency work we're constantly getting new libraries/technologies we can use with the aim of using them to improve future projects (not always the case). Does a similar thing apply in product work?

It highly depends on the size of the team and the phase of the product. My whole company is 4 people (two founders, me, and a part time designer) and right now we're rolling out v2 of the successful MVP they launched before I was hired. Once we release the day to day will be all about iterating, adding features, and maybe eventually growing the product line. When we have pain points that can be solved with new tech we will likely rewrite or rearchitect to some degree. Look how many long-standing web products have moved to React on the front end, or something like Go on the back-end.

prom candy
Dec 16, 2005

Only I may dance
Write everything down. Write down the stuff you're planning on doing in the next 3 hours and then write down that you did it.

https://en.wikipedia.org/wiki/Bus_factor

prom candy
Dec 16, 2005

Only I may dance

kedo posted:

Just take your hourly rate, estimate the maximum hours you'd need per month, and then do a retainer for that number of hours at your rate or maaaaybe a little less if it's for an extended period of time.

On the other hand entirely, unless you're really hard up for work I wouldn't recommend maintenance. You'll eventually start filling a webmaster role and it will suck. The whole point of WP is that the client should be able to update their own content, and maybe once in a blue moon need your help to perform an update.

Try to figure out what it's worth to them and charge that. I disagree with your second point. Having recurring revenue is the only real way you can scale yourself as a freelancer. It's also a good way to maintain contact with your clients and make sure their sites don't atrophy. If you keep them happy they'll refer you new business, and you can potentially sell them expanded services down the road.

The hustle of constantly finding new clients, delivering one project for them, and then moving on the next one is pretty unsustainable if you're trying to build a business. It'll also kill you when their sites start having issues in 2-3 years and they need help and want it for free. It does work well if you're just doing side work to make some extra cash though.

prom candy
Dec 16, 2005

Only I may dance
Headless Wordpress is awesome, if I was doing sites right now I'd probably be all about Wordpress+Gatsby.

prom candy
Dec 16, 2005

Only I may dance
How do you handle stuff like keeping Wordpress secure? Just pay-as-you-go maintenance tasks?

prom candy
Dec 16, 2005

Only I may dance
Someone posted a bit about it on the last page but has anyone built anything with Tailwind? I hated utility-first CSS when I tried it a few years ago, but I think part of that was people kept lazily loving with the utilities, so the text-red class would also add 5px of bottom margin. That's when I switched over to using BEM and now I'm using styled-components with React, but the pain point of that is having to come up with names for everything, or constantly writing components that are just display: flex and align-items: center.

prom candy
Dec 16, 2005

Only I may dance

Thermopyle posted:

This morning I'm trying to select a styling solution for the React app I started a few days ago.

How do you feel about using styled-components?

Coming from BEM and SASS before I like it quite a bit. Co-locating my styles inside my react component makes a lot of sense, and it makes it pretty easy to do common stuff like changing how something looks based a component's props or state. It's also better than BEM in that if you stop using a style you created your linter will yell at you so you're never pushing dead CSS. The problems are similar to BEM in that you end up creating a ton of styled components with dumb names like TopArea just to set display: flex on them. They've added the css prop which is nice because you can kind of inline your styles in those cases, but in that case I'm more interested in something like Tailwind because I think I'd much rather have

code:
<div className="flex items-center justify-between blue-light">{children}</div>
than

code:
<div 
  css={`
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: ${colors.lightBlue};
  `}
>
  {children}
</div>
I haven't actually used an utility-first CSS system though and I always suffer from grass-is-greener syndrome so I'm sure if I had started with that and was using it on my 500+ component project I'd probably be looking longingly at styled-components instead because scale is hard no matter what. In terms of picking a library, I'm not sure if I would pick styled-components over Emotion right now. They constantly go back and forth between being the most performant, and it seems like their syntaxes are similar enough that you could easily swap one out for the other. I like those two over the other CSS-in-JS solutions because I like sticking with actual CSS syntax instead of javascript object syntax. It makes it a lot easier to copy and paste code from older projects or a codepen or whatever. The one other issue I've had with styled-components is it's kind of a pain to use with Typescript. I've ended up really abusing type asserting styled-components to "any" because the DX to properly type your add-on props is pretty atrocious. I'm not sure if Emotion is any better in that regard.

prom candy
Dec 16, 2005

Only I may dance
style-components has a lot of stuff that SASS users will appreciate, like descendant selectors, &:hover shorthand, etc. I can't think of anything I used to do in SASS in that I can't do in styled-components.

prom candy
Dec 16, 2005

Only I may dance

my bony fealty posted:

I've never been bothered by this because you can either 1) write a base styled component with the reusable style and extend it or 2) just add a class to it. or heck just reuse the same styled component all around your project if you want, if it really is just the same rules over and over, just export it.

the thing about styled-components is that not everything has to be a styled component, which saves having to write out each individual tag as a component. if you need a div just use a div and if it needs a rule style it from its parent. if you do this too much it gets messy and can gently caress with scoping yes but those are just problems inherent in css.

also with createGlobalStyle now it's viable to set up some utility classes that your whole tree has access to. I guess injectGlobal could've done this before too but its easier now.

Yeah, I have created a few utility classes already. For whatever reason I've mostly avoided using className selectors within a styled component but I guess there's really no reason for that. Although if I'm adding classnames that still doesn't solve the other problem of having to come up with names for everything. I do use descendent selectors sometimes but I almost always stick to using direct-child selectors because anything else just gets real sketchy in a large app. It's definitely possible that I have just been making far too many styled components though.

ddiddles posted:

I recently looked into setting up or using a utility-first css setup to put in a style guide into a fairly large existing app thats just a nightmare of redundant styling.

I would highly recommend against it if you do any sort of complex responsive stuff, otherwise you end up with divs that look like this, all over.

code:
<div class="p-t-xl p-lr-md m-b-xl p-t-xl-break-lg p-lr-md-break-lg m-b-xl-break-lg p-t-xl-break-sm p-lr-md-break-md m-b-xl-break-sm">
I ended up deciding on using css modules with scss since we're writing in that anyway, and its actually really nice, import your stylesheet as an object into your component and it auto transforms your classnames so they dont clash, so every one of your .scss files can have an un nested .container selector, and they get changed to something like "Component_selector_content_hash".

I have a bunch of style guide sass partials that spit out a bunch of classnames you can use sass extend on to apply to your components stylesheet, ends up something like this (React focused)

code:
// stylesheet.scss
@import '~styles/guide/padding';
@import '~styles/guide/margin';
@import '~styles/guide/breakpoints';

.container {
  @extend .p-t-xl, .p-lr-md, .m-b-xl;

  @media (max-width: $break-lg) {
    @extend .p-t-lg, .p-lr-md;
  }

  @media (max-width: $break-sm) {
    @extend .p-t-sm, .m-b-sm;
  }
}


// MyComponent
import styles from './stylesheet.scss';

<div className={styles.container}>
Currently in the stages of testing its implementation on a new feature, its a pretty nice setup so far.

That classname soup on the div is absolutely disgusting for sure, but I think what you've done in terms of mixing a bunch of stuff in is also possible with Tailwind using the @apply directive, so it's kind of two sides of the same coin. I also find reading that classname soup shorthand way harder than just reading CSS, but I think that also comes along with learning the tool itself, because I also find reading your @extends pretty difficult and I think that's only because it took me a second to understand your naming convention. I guess the reality is we're dealing with complexity and it has to go somewhere.

prom candy
Dec 16, 2005

Only I may dance
Use GraphQL because it's sweet and looks good on a resume

prom candy
Dec 16, 2005

Only I may dance

ddiddles posted:

Ah yeah, I initially went with the short class names just because I was sticking them in the template, but with setup you could make your class names more semantic.

I don't think there's anything wrong with short names, you still have to type them in the CSS so as long as the naming is consistent it seems to make sense. It just means that someone who's new to the project can't just quickly glance at a div's class attribute or inside your SASS file and understand exactly what each rule is doing. It only took me like 20 seconds to start to understand your naming conventions though.

I guess the nice thing about using a pre-built utility-first CSS library is that they come with documentation, so if you do have new people joining your team you can just tell them "we use <x>, here's the docs"

prom candy
Dec 16, 2005

Only I may dance

Jon Joe posted:

Complete novice here, started playing around with html+css+javascript a week ago to prototype some ideas I had. Right now I'm trying to figure out what I should use to do database-like stuff. Nothing fancy, I just want to create a bunch of objects with the same keys but different values and then get all objects that match a certain key value, so I can display them.

Whatever I use it want it to be a hosted library since like I said I'm just doing prototyping so I don't care about security and I want to be as lazy as possible in setting things up. I searched cdnjs for 'database', looked at every option, and feel a little overwhelmed, so I just want to know whatever it is you might recommend.

Read only or read/write? How much data?

prom candy
Dec 16, 2005

Only I may dance

Jon Joe posted:

Read only. Can't imagine it'll be more than a few hundred entries at the largest, each with around fifteen key:value pairs, of which I'd want to be able to filter by all of them, perhaps even all at the same time.

I looked into doing something similar to what Tei recommended, but I only have access to OpenOffice Calc and Google Sheets, neither of which can export to JSON by default, and the user-created plugin for doing that on google wants full access to every file on my drive, even non-sheet files.

I might just make a big rear end json file in that situation. You could also use some kind of db as a service solution like graph.cool or firebase.

prom candy
Dec 16, 2005

Only I may dance
I'm actually in the process of trying to switch to windows for web dev right now and currently I'm using Hyper. I decided to just use tmux to handle my tabbing/split pane stuff because then my setup isn't so env specific, so maybe give that a try if you're willing to get a little more command-line dork about it. The nice thing is you can write scripts to get your tabs/panes exactly how you like them for a given project.

I'm having a weird problem and I don't know where to start, but I figure someone in this thread might be able to point me in the right direction even though it's only tangentially related. For the past 6 weeks or so all my code pushes to AWS S3 and EKS have been brutally slow. My upload speed is somewhere around 150-300 KB/s, which makes for bruuutal deploy times if I have to do something like deploy the Rails container after the gems change. I was recently away and on hotel wifi the deploys were fast as expected. Incidentally in this time I've replaced my router and cable modem, and also upgraded my internet service. Speedtest.net consistently reports 15-20mbps upload speeds so I should be pushing pretty decent speeds. I've asked in a Slack for local devs if other people on my ISP are having this issue and no one said they were.

I don't even know where to start with this, has anyone ever experienced anything like this? Should I just call my ISP?

prom candy
Dec 16, 2005

Only I may dance

The Fool posted:

ConEmu supports multiple shells, powershell, wsl bash, git bash, etc.

Quake mode let's you show/hide your console window with a keyboard shortcut.

Then you can use keyboard shortcuts to launch or switch between tabs.

Also has a bunch of themeing options, profile customizations, macros, etc.

Yeah I looked at ConEmu, I don't remember what it was that I didn't like about it. For some reason I went with Hyper but I don't really need Yet Another Electron App running.

prom candy
Dec 16, 2005

Only I may dance
I'm off Hyper already since it doesn't send mouse events to tmux.

prom candy
Dec 16, 2005

Only I may dance
So after a week of issues I'm off windows and back on my Mac again. I really want Windows dev to work for me and maybe I'm going about it in the wrong way (trying to bring over all my workflows from MacOS) but I was just running into issue after issue:

1. Couldn't find a terminal emulator that did everything I wanted: render utf8/powerline fonts, worked nicely with tmux incl. mouse mode. Tried Hyper, Ubuntu.exe, cmder.

2. zsh kept hanging after command execution. Not all the time, usually ctrl-c a couple times worked, but not always.

3. Ran into issues a couple times where webpack-dev-server would just stop responding at all. Restarting it didn't fix, the only thing that worked was running it again on a new port. So it was like there was a ghost process.

4. Docker seemed to have file permission errors. When I would connect to the app running my Rails server it wasn't outputting anything (normally rails server is noisy as hell) and would frequently not write anything to the log folder. Now and then it would just refuse to start and say it couldn't see the log folder.

I dunno if I should give up on running WSL and try installing node etc. directly to Windows. I need Docker to work but the permissions issues might've also been related to being installed/mounted through a windows drive that's also on WSL? It sounds like there's a bunch of you in this thread who have long term web dev experience on Windows, any suggestions?

Adbot
ADBOT LOVES YOU

prom candy
Dec 16, 2005

Only I may dance
I've played around with Virtual Machines before, I think at that point I'd rather dual boot to Linux (but I also don't really want to do that because I've never been able to consistently run and enjoy Linux.) I ran Vagrant on my Mac for a while and the shared filesystem thing was a constant source of headaches. Appreciate the suggestion though.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply