varsock

joined 1 year ago
MODERATOR OF
[–] varsock 1 points 1 year ago (12 children)

curious to see if AI can decipher? Certainly! bonus that we get so see potentially beneficial shell

[–] varsock 3 points 1 year ago* (last edited 1 year ago) (14 children)

I'm having a lot of fun taking these inscrutable lines of shell and asking AI to decipher it. Check it out:

spoilerThe ZDOTDIR variable in Zsh specifies the directory where the configuration files (.zshrc, .zshenv, .zshlogin, .zshlogout, .zprofile, and .zlogin) are located. By default, this directory is the home directory of the current user. If ZDOTDIR is set, Zsh will use the configuration files from that directory instead of the home directory.

The script you've posted appears to be setting the ZDOTDIR variable in a complex way, using Zsh parameter expansion and modifiers. Here's the breakdown:

${(%):-%x}: This is using Zsh's %(x,y,z) prompt sequence expansion. This construct is used to insert conditional strings in the prompt. However, in this case, the construct is being abused to get the full path of the currently running script (%x), since the else branch (- modifier) of a prompt sequence expansion is always executed.

:P: This is a Zsh parameter expansion modifier that makes the resulting path absolute by resolving symbolic links. It effectively "canonicalizes" the path.

:h: Another Zsh parameter expansion modifier, which removes the trailing component from a path, effectively getting the directory portion of a file path. This is equivalent to dirname in a POSIX shell.

In summary, this script sets ZDOTDIR to the directory of the currently running script, resolving any symbolic links to get the absolute path. This would make Zsh look in that directory for its configuration files, instead of the home directory. It seems to be useful for a script that's bundled with its own Zsh configuration files, and wants to use those instead of the user's configuration

[–] varsock 5 points 1 year ago

You're welcome. But don't let this, or any other advice comfort you up to the point where it'll dilute the feeling of urengcy you have now. It is a good motivator; act on it. We all risk becoming obsolete if we get too cozy. Tech moves on; in this field you need to always be learning. I have no advice on how to juggle that and avoid burnout - still figuring that one out :D

[–] varsock 7 points 1 year ago* (last edited 1 year ago) (2 children)

I've met many people (myself included) in the tech industry that have experienced similar feelings of stagnation and uncertainty about their career path. You're not alone and there are definitely ways to get where you want to be. From experience, FUD can really eat you alive if you dwell on it.

Having a background in many technologies is actually a strength, not a weakness. It does nothing to hold you back from specializing. You have the ability to understand the broader tech landscape, and that's a valuable trait. While it's true that specialization is important, a wider knowledge base can help you see how different technologies work together, which can make you a more effective problem solver and innovator when you eventually specialize.

Whatever you do, continue to learn and upskill. It seems like you're already doing this, but keep it up.

Some advice? Leverage your current position. It's paying the bills and then some. Keep it around while you learn. You say your current job is not as technically challenging as you would like, this comes with 2 advantages.

  1. You can do the bare minimum to stay employed. Since you're not trying to advance in the current field you don't have to stress yourself. Do what you gotta do, no more no less. Use the extra time and energy to put into learning. You don't have to worry about the bureaucracy or "doing the role you want to be promoted to" - often a pre-req to promotion.

  2. You can get "selfish" in the way you problem solve by pushing solutions that you want to work on. Look at this this way, you have the solution (something you want to work on) now find a problem in your org you can apply it to. It doesnt have to be optimal, as long as it solves something If you gey noticed, you will become that guy that can do X. This is how I've managed to shift my career in the same department. If you don't get noticed, at least you have real experience applied solutions you want to work on.

See if your company can pay for some classes or trainings. Formal education is definitely not critical but depending on what field you want to break into, they might require either degree or YOE equivalent. So you can work toward a degree while working.

As for the experience question, it can be tough when job postings ask for a certain number of years of experience. Remember that these are usually more like guidelines than hard rules. If you can demonstrate your ability through your projects and show enthusiasm for the role, many employers are willing to overlook a lack of formal experience.

Do lots of LeetCode so you can ace the technical/programming part of the interview. For the rest, honestly just bullshit and be able to talk about how you applied the skill your interviewer is looking for in the domain you're in now. One advantage to that is, since you have a broad view, you have many avenues to talk about.

It's not too late for you. I had a friend that became a math teacher, no formal programming experience. After 10 years he wanted to program. He spent 1 year doing Leetcode and learning how to ace programming interviews and toy problems and now works at Google. SOB went from 60k to 300k, second job ever. What he works on? Google classroom. Can't guarantee the same results, but you can do it!

[–] varsock 1 points 1 year ago

give "enabling in the IDE" a shot immediately. The best way to learn what keybindings are useful is by fixing the friction you have when actively using it. When you've mastered the basics you can then think "how can I improve this this thing that I hate that takes time"

[–] varsock 2 points 1 year ago* (last edited 1 year ago) (1 children)

Let's see what AI has to say about that :D copy-pasting OP's post with some context and letting an AI bot answer it.

@[email protected] programming.dev is an instance that his home to online communities that attracts programmers and other tech enthusiasts.

There are no platform's rules, guidelines and policies regarding the use of AI-generated content and we would like to weigh the pros and cons.

I wanted to start a discussion about the use of AI-generated solutions on Programming.dev. Personally, I've found that AI-powered tools have been incredibly helpful in solving programming questions. I won't name any specific commercial software, but I use one that combines GPT-4 and web search to get more factual information. I write some answers I think I might revisit to the ShareGPT community, but I would prefer posting programming solutions to this instance. However, I'm not sure if AI-generated solutions are welcomed on programming.dev. I'd love to hear your thoughts on this. If AI-generated responses are accepted, how should we format the answers, should we just copy paste without quoting, should we quote the model, just mention that it's AI-generated,...?

[–] varsock 2 points 1 year ago

I agree with this comment. Get these down then you can check this out

[–] varsock 1 points 1 year ago

Learning a new technology, especially for UI, can indeed seem intimidating at first, but with a structured approach, you can certainly master JavaFX. Here's a roadmap you can follow:

  1. Prerequisites: Ensure you have a solid foundation in core Java before diving into JavaFX.

  2. Setup Development Environment: Install the latest version of Java (JDK). Install a good Integrated Development Environment (IDE). IntelliJ IDEA is a good option, but Eclipse can work well too. Install JavaFX SDK: Download it from Gluon's JavaFX page, and add it to your project's libraries.

  3. Learn JavaFX basics: Understand the basic structure of a JavaFX application. The previous example can help here. Learn about the Application class and the lifecycle of a JavaFX application. Understand the JavaFX Scene Graph - Stage, Scene, and Nodes. Learn about the basic UI components like Button, Label, Textfield, etc.

  4. Layouts and Event Handling: Understand different types of layout managers in JavaFX (like HBox, VBox, GridPane, BorderPane etc.), and when to use which. Learn how to handle user events (like button clicks).

  5. Styling with CSS: JavaFX allows you to style your UI with CSS. Learn how to apply styles to your components.

  6. FXML and Scene Builder: FXML is an XML-based language that enables you to design the user interface separate from the application logic. This improves the separation of concerns. Scene Builder is a visual layout tool that lets you design UIs without needing to write FXML code manually.

  7. Advanced Topics: Once you're comfortable with the basics, dive into more complex UI controls like TableView, TreeView, etc. Learn about JavaFX properties and bindings. Explore JavaFX animations and transformations.

  8. Real-World Projects: As with any technology, the best way to learn is by doing. Try to build a few projects on your own. Start small, with something like a calculator or a simple form.

Resources: The JavaFX official documentation is a good starting point. MOOCs: Sites like Coursera, Udemy, etc. have courses on JavaFX. Books: "JavaFX For Dummies" is a good start for beginners. For a deeper dive, consider "Pro JavaFX 8" and "Mastering JavaFX 10". Tutorials: There are many free tutorials available online, on websites like TutorialsPoint, or video-based tutorials on YouTube.

Remember, practice and persistence are key. Happy coding!

[–] varsock 1 points 1 year ago (2 children)

Sure, here is a simple "Hello, World!" program written in JavaFX. It simply creates a small window that says "Hello, World!":

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.stage.Stage;

public class HelloWorld extends Application {

    @Override
    public void start(Stage primaryStage) {
        Label helloWorldLabel = new Label("Hello, World!");
        Scene scene = new Scene(helloWorldLabel, 200, 100);
        primaryStage.setScene(scene);
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }

}

Now, let's break it down:

  1. Import Statements: These lines import the necessary classes from the JavaFX library that will be used in this program.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.stage.Stage;
  1. Class Declaration: This line declares a new public class called HelloWorld that extends the Application class. The Application class is part of JavaFX and serves as the base class for creating desktop applications.
public class HelloWorld extends Application {
  1. Start Method: This is the main entry point for all JavaFX applications. It is called when the program is launched. The Stage object, primaryStage, is the main top-level container.
@Override
public void start(Stage primaryStage) {
  1. Label Creation: This line creates a new Label object, helloWorldLabel, and sets its text to "Hello, World!".
Label helloWorldLabel = new Label("Hello, World!");
  1. Scene Creation: This line creates a new Scene object, scene, adds helloWorldLabel to it, and sets its width to 200 pixels and its height to 100 pixels.
Scene scene = new Scene(helloWorldLabel, 200, 100);
  1. Setting the Scene: This line sets the primaryStage's scene to scene.
primaryStage.setScene(scene);
  1. Displaying the Stage: This line shows the primaryStage, which makes the GUI visible.
primaryStage.show();
  1. Main Method: This is the entry point for the Java program and is the first method that gets executed when the program starts. It calls the launch method, which then calls the start method.
public static void main(String[] args) {
    launch(args);
}
[–] varsock 3 points 1 year ago* (last edited 1 year ago) (2 children)

Then I realized that I haven’t done any coding and spent all of my time focusing on editors. So here is my question (which has probably been asked many times): what is the point of investing so much time learning all of this when there are some IDEs that are preconfigured with all the functionality a programmer would need ?

I applaud you for realizing this so early on, and acting on it. I spent waaay too much time in rabbit holes, resulting in not doing anything productive and becoming overwhelmed.

In short, learn vim keybindings for text based navigation - that is the game changer in being productive. Activate vim navigation in an IDE. Don't try to make a terminal based IDE with vim plugins unless that is a hobby.

[–] varsock 1 points 1 year ago

I didn’t even have time to be stressed when I got home.

legendary 😂

[–] varsock 2 points 1 year ago

Like @ethan said

I don’t miss the commute, and I don’t miss the office, but I do really miss being around people.

We are a social species and I guess we have to respect that. I have trouble finding those folks with similar interests. And if i find them, I might still drop the ball in engaging.

view more: ‹ prev next ›