반응형
반응형

LEGB Rule

  • 파이썬 변수 scope 룰을 LEGB 룰이라고 불리기도 합니다.
  • 변수가 값을 찾을 때, Local -> Enclosed -> Global -> Built-in
  • local - 가장 가까운 함수안 범위 입니다.
  • Enclosed - 파이썬은 함수 안에 함수가 정의 될수 있는데, 가장 가까운 함수가 아닌 두번째 이상의 함수 가까운 함수범위입니다.
  • Global - 함수 바깥의 변수 또는 import된 module
  • Built-in - 파이썬안에 내장되어 있는 함수 또는 속성들입니다.
>>> a = 5    # Global
>>> b = 10   # Global
>>> def outer():
...     a = 10  # outer함수의 local이며, inner함수의 Enclosed
...     def inner():
...             c=30 # inner 함수의 local
...             print(a, b, c)
...     inner()
...     a = 22  # outer함수의 local이며, inner함수의 Enclosed
...     inner()
... 
>>> outer()
10 10 30  
22 10 30
반응형
반응형

"""_summary_
얕은 복사(shallow copy)
    list의 슬라이싱을 통한 새로운 값을 할당해봅니다.
    아래의 결과와 같이 슬라이싱을 통해서 값을 할당하면 새로운 id가 부여되며, 서로 영향을 받지 않습니다
"""

print("\n","*" * 30, "\n   얕은 복사(shallow copy) \n","*" * 30) 

a = [1, 2, 3]
b = a[:]
print(" a = ", a)
print(" b = ", b)

print(" id(a) : ", id(a)) #다른 주소
print(" id(b) : ", id(b))

print(" a == b : ", a == b)
print(" a is b : ", a is b)

b[0] = 5

print(a)
print(b)

""" 
    하지만, 이러한 슬라이싱 또한 얕은 복사에 해당합니다.
    리스트안에 리스트 mutable객체 안에 mutable객체인 경우 문제가 됩니다.
    id(a) 값과 id(b) 값은 다르게 되었지만, 그 내부의 객체 id(a[0])과 id(b[0])은 같은 주소를 바라보고 있습니다
"""
a = [[1,2],[3,4]]
b = a[:]
print(" id(a) : ", id(a)) #다른 주소
print(" id(b) : ", id(b))

print(" id(a[0]) : ",id(a[0])) #같은 주소
print(" id(b[0]) : ",id(b[0]))


"""깊은 복사(deep copy)
    깊은 복사는 내부에 객체들까지 모두 새롭게 copy 되는 것입니다.
    copy.deepcopy메소드가 해결해줍니다
"""
print("\n","*" * 30, "\n   deepcopy \n","*" * 30)  

import copy

a = [[1,2],[3,4]]
b = copy.deepcopy(a)
a[1].append(5)

print(" a : ", a)
print(" b : ", b)

print(" id(a) : ", id(a)) #다른 주소
print(" id(b) : ", id(b))

 

반응형
반응형

[python] 얕은 복사(shallow copy)와 깊은 복사(deep copy)

 

https://wikidocs.net/16038

 

12. 얕은 복사(shallow copy)와 깊은 복사(deep copy)

## 1. mutable과 immutable 객체 객체에는 mutable과 immutable 객체가 있습니다. ❈ 객체 구분 표 class 설명 구분 l…

wikidocs.net

 

1. mutable과 immutable 객체

객체에는 mutable과 immutable 객체가 있습니다.

❈ 객체 구분 표

class설명구분

list mutable 한 순서가 있는 객체 집합 mutable
set mutable 한 순서가 없는 고유한 객체 집합 mutable
dict key와 value가 맵핑된 객체, 순서 없음 mutable
bool 참,거짓 immutable
int 정수 immutable
float 실수 immutable
tuple immutable 한 순서가 있는 객체 집합 immutable
str 문자열 immutable
frozenset immutable한 set immutable

일반 user가 작성한 class도 대부분 mutable 한 객체 입니다.
immutable한 클래를 만들기 위해서는 특별한 방법이 필요합니다.

https://stackoverflow.com/questions/4828080/how-to-make-an-immutable-object-in-python

  • REPL에서 mutable과 immutable에서 구분해봅시다. 몇가지만 해봅니다.
  • list 는 mutable 입니다.
  • 변수 a 에 1, 2, 3을 원소로 가지는 리스트를 할당하였습니다.
  • id는 변수의 메모리 주소값을 리턴해줍니다.
  • a의 첫번째 원소를 변경한 후에도 id값은 변경없이 a의 변수가 변경되었습니다.
>>> a = [1, 2, 3]
>>> id(a)
4393788808
>>> a[0] = 5
>>> a
[5, 2, 3]
>>> id(a)
4393788808
  • set도 mutable입니다.
  • |= set에서 or 연산입니다. 합집합이 됩니다.
  • 값은 변경되었으나 id는 변함없습니다.
>>> x = {1, 2, 3}
>>> x
{1, 2, 3}
>>> id(x)
4396095304
>>> x|={4,5,6}
>>> x
{1, 2, 3, 4, 5, 6}
>>> id(x)
4396095304
  • str은 immutable 입니다.
  • s 변수에 첫번째 글자를 변경 시도하면 에러가 발생합니다.
  • s에 다른 값을 할당하면, id가 변경됩니다. 재할당은 애초에 변수를 다시할당하는 것이므로 mutable과 immutable과는 다른 문제입니다. list또한 값을 재할당하면 id가 변경됩니다.
>>> s= "abc"
>>> s
'abc'
>>> id(s)
4387454680
>>> s[0]
'a'
>>> s[0] = 's'
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'str' object does not support item assignment
>>> s = 'def'
>>> s
'def'
>>> id(s)
4388970768

2. 변수 간 대입

2-1 mutable한 객체의 변수 간 대입

  • list의 얕은 복사를 확인 해봅니다.
  • b 에 a를 할당하면 값이 할당되는 것이 아니라 같은 메모리 주소를 바라봅니다.
  • b를 변경하면 같이 a도 바뀝니다.
  • mutable한 다른 객체 또한 똑같은 현상이 나타납니다.
>>> a = [1, 2, 3]
>>> b = a # shallow copy
>>> b[0]= 5
>>> a
[5, 2, 3]
>>> b
[5, 2, 3]
>>> id(a)
4396179528
>>> id(b)
4396179528

2-2 immutable한 객체의 변수간 대입

  • str 문자열의 얕은 복사를 확인해봅니다.
  • list와 똑같이 b를 a에 할당하면 같은 메모리 주소를 바라보게 됩니다.
  • 하지만 b에 다른 값을 할당하면 재할당이 이루어지며 메모리 주소가 변경됩니다.
  • 고로 a와 b는 다른 값을 가집니다.
>>> a = "abc"
>>> b = a
>>> a
'abc'
>>> b
'abc'
>>> id(a)
4387454680
>>> id(b)
4387454680
>>> b = "abcd"
>>> a
'abc'
>>> b
'abcd'
>>> id(a)
4387454680
>>> id(b)
4396456400

3. 얕은 복사(shallow copy)

  • list의 슬라이싱을 통한 새로운 값을 할당해봅니다.
  • 아래의 결과와 같이 슬라이싱을 통해서 값을 할당하면 새로운 id가 부여되며, 서로 영향을 받지 않습니다.
>>> a = [1,2,3]
>>> b = a[:]
>>> id(a)
4396179528
>>> id(b)
4393788808
>>> a == b
True
>>> a is b
False
>>> b[0] = 5
>>> a
[1, 2, 3]
>>> b
[5, 2, 3]
  • 하지만, 이러한 슬라이싱 또한 얕은 복사에 해당합니다.
  • 리스트안에 리스트 mutable객체 안에 mutable객체인 경우 문제가 됩니다.
  • id(a) 값과 id(b) 값은 다르게 되었지만, 그 내부의 객체 id(a[0])과 id(b[0])은 같은 주소를 바라보고 있습니다.
>>> a = [[1,2], [3,4]]
>>> b = a[:]
>>> id(a)
4395624328
>>> id(b)
4396179592
>>> id(a[0])
4396116040
>>> id(b[0])
4396116040
  • 재할당하는 경우는 문제가 없습니다. 메모리 주소도 변경되었습니다.
>>> a[0] = [8,9]
>>> a
[[8, 9], [3, 4]]
>>> b
[[1, 2], [3, 4]]
>>> id(a[0])
4393788808
>>> id(b[0])
4396116040
  • 하지만, a[1] 에 값을 변경하면 b[1]도 따라 변경됩니다.
>>> a[1].append(5)
>>> a
[[8, 9], [3, 4, 5]]
>>> b
[[1, 2], [3, 4, 5]]
>>> id(a[1])
4396389896
>>> id(b[1])
4396389896
  • copy 모듈의 copy 메소드 또한 얕은 복사입니다.
>>> import copy
>>> a = [[1,2],[3,4]]
>>> b = copy.copy(a)
>>> a[1].append(5)
>>> a
[[1, 2], [3, 4, 5]]
>>> b
[[1, 2], [3, 4, 5]]

4. 깊은 복사(deep copy)

  • 깊은 복사는 내부에 객체들까지 모두 새롭게 copy 되는 것입니다.
  • copy.deepcopy메소드가 해결해줍니다.
>>> import copy
>>> a = [[1,2],[3,4]]
>>> b = copy.deepcopy(a)
>>> a[1].append(5)
>>> a
[[1, 2], [3, 4, 5]]
>>> b
[[1, 2], [3, 4]]




https://suwoni-codelab.com/python%20%EA%B8%B0%EB%B3%B8/2018/03/02/Python-Basic-copy/

 

반응형
반응형

모든 웹 개발자가 알아야 할 7가지 개념!

https://pinjarirehan.medium.com/7-concepts-every-web-developer-should-know-b32407fda8dc

 

7 Concepts Every Web Developer Should Know!

Whether you’re a seasoned developer or a curious beginner just starting, creating outstanding websites needs more than just stunning…

pinjarirehan.medium.com

 

Whether you’re a seasoned developer or a curious beginner just starting, creating outstanding websites needs more than just stunning animations and interesting effects.

It all comes down to a solid basis in important concepts.

Mastering these bad boys will make you a more effective and flexible developer, ready to take on every task.

So grab your favorite coding cup (coffee for all-nighters, anyone?), and let’s get started!

Have a BIG IDEA in mind? Let’s discuss what we can gain together.

Write at Gmail | LinkedIn

 

01. The Big Three: HTML, CSS & JavaScript

Take these three to be the web’s basic building blocks.

HTML organizes your content, CSS beautifully styles it, and JavaScript adds interaction and personality.

Here is a basic breakdown:

  • HTML (Hypertext Markup Language) is the basis for your website, specifying elements such as headers, paragraphs, and illustrations.
  • CSS (Cascading Style Sheets): CSS makes your website visually attractive. CSS pseudo-classes can offer dynamic effects when a button is hovered over or focused, such as changing its color or adding stunning animations.

Actionable Tip: Use the BEM (Block-Element-Modifier) structure to write clean, maintainable CSS.

  • JavaScript: This is the magic that allows webpages to interact with one another. Learn how to write clean, maintainable JavaScript to avoid code challenges in the future.

02. Responsive Web Design

Imagine how your website looks on a large desktop display but not on a mobile device.

Not cool.

Responsive design guarantees that your website works effortlessly on any device, especially PCs, tablets, and smartphones.

Here is the secret sauce:

  • Media Queries are like magic spells that tell your website to customize its layout depending on screen size.
  • Fluid Grids: Imagine a website layout as a grid. Fluid grids use percentages rather than set pixels, allowing the grid to “flow” and adjust to different displays.
  • Flexible images: Large photos might slow down your mobile page. Use flexible images that resize to fit the screen size.

03. Version Control with Git

Ever worked on a project, made changes, and then accidentally messed things up? Git version control is a savior.

It tracks changes to your code, allowing you to restore to previous versions and interact with others smoothly.

Here’s a crash course on Git basics.

  • Repositories: Think of a repository as the hub for all of your code versions.
  • Commits: These are snapshots of your code at specified moments in time. You can include messages that explain the changes that you made.
  • Branches: Assume you want to test out a new feature without impacting the main code. Branches let you work on changes separately before merging them back into the main codebase once you’re satisfied.

04. HTTP/HTTPS & APIs

The web is all about communication! HTTP (Hypertext Transfer Protocol) is the language that computers use to communicate with one another.

When you visit a website, your browser sends an HTTP request, and the server returns an HTTP response giving the website content.

  • HTTPS (Hypertext Transfer Protocol Secure) is the secure version of HTTP, which encrypts data transport to safeguard your website and user information. Always use HTTPS to ensure security!
  • APIs (Application Programming Interfaces) are similar to waiters at a restaurant. They accept your request (such as collecting user data) and deliver the information you want from another system. Understanding APIs is essential for creating interactive web apps.

05. Basic SEO:

Do you want your website to be the first thing visitors see when searching for something? Basic Search Engine Optimization (SEO) can help!

  • Meta Tags: These are hidden messages for search engines that include information about your website’s content.
  • Keywords: These are the terms that people are likely to look for. Use relevant keywords strategically throughout your website’s content.
  • Website Performance Optimization: A slow website is a sad one. Optimize your website’s image size and code structure for faster loading, which benefits both search engines and visitors.

06. Web Accessibility

The web should be accessible to everyone! Web accessibility means that persons with disabilities can get to and use your website.

  • Semantic HTML means using HTML elements to explain the meaning and purpose of your content, instead of merely displaying it.
  • ARIA Roles are unique properties that give additional information to screen readers used by visually impaired people.
  • Keyboard Navigation: A mouse is not used by everyone. Ensure that your website can be accessed just by keyboard.

07. Performance Optimization

No one loves a slow website! Optimize your website’s speed by reducing HTTP requests (the number of times it asks the server for something), adding caching (storing frequently used items locally), and optimizing images for more quickly loading.

Remember that a quick website means a happy user (and a happy search engine!).

Pro Tips & Best Practices: From a Developer to You

Here are some gold pieces I’ve picked up along my journey.

  • Always comment on your code! Your future self (or someone else) will thank you.
  • Do not let yourself be afraid to experiment! Break things, try new things, and learn from the mistakes you make.
  • The dev community is ready to help! There are many communities and resources out online. Don’t be hesitant to ask questions.

 

반응형
반응형

https://blog.curiosity.ai/10-hottest-new-productivity-apps-may-2024-4ced554c337c

 

🏆 10 Hottest New Productivity Apps - May 2024

Meet the 10 most upvoted apps in May — via ProductHunt.

blog.curiosity.ai

 

 

The Product Hunt community is buzzing about these incredible apps, and we’re here to tell you why!

Dive into the world of digital innovation with us as we showcase the elite selections from May’s latest findings.

From advanced SaaS and productivity boosters to groundbreaking AI tools, essential remote work resources, and premium solutions for developers, marketers, fintech aficionados, and even those in the dating scene — this list has it all.

Hottest Apps in May 2024, according to the Product Hunt community

Prepare to elevate your productivity game with these prime picks!

Curiosity: your AI assistant, search engine, and much more!
 

1. Wegic

The first AI web designer & developer by your side
Tags: Design Tools, Website Builder, Developer Tools
PH Launch: 14.05.2024
Upvotes: 1987 ▲

Chat with Wegic and see your dream website come true

If you’ve ever wished for a magic wand to bring your web dreams to life without all the technical fuss, then let’s talk about Wegic.

Powered by the latest GPT-4o model, this web designer and developer is ready to turn your ideas into reality through simple conversations. Just share your vision, even if it’s rough around the edges, and Wegic will understand and bring it to life.

The app can create and modify websites in multiple languages, with custom domains, ensuring that your ideas are translated into a functional and beautiful page without hassle.

🪙 Pricing

  • Starter plan: Free (120 credits/month, 3 pages on website, 1k visitors/month, SSL certificate)
  • Basic plan: $9.90/month (400 credits/month, 10 pages on website, remove Wegic badge, 10k visitors/month)
  • Pro plan: $15.90/month (1000 credits/month, unlimited pages on website, custom domain, unlimited visitors/month)
 

2. Waxwing

AI copilot for every marketing task
Tags: Productivity, Marketing, Artificial Intelligence
PH Launch: 02.05.2024
Upvotes: 1658 ▲

Shape the future of your marketing with adaptive strategies and role-based KPI alignment through Waxwing

Every marketer needs to streamline efforts, save time, and cut costs. And maybe you’ve got the creativity and drive on the field, but need that extra push to become an AI-savvy marketer. Waxwing is that helping hand.

With just two minutes of onboarding, you can dive into detailed step-by-step plans complete with KPIs, impact assessments, effort estimates, and cost evaluations, backed up by a database of 500+ personalized marketing strategies.

Waxwing integrates with third-party tools like Similarweb and Semrush, as well as your internal tools, creating a central hub for all your business intelligence. Its context-aware AI acts as a copilot, always knowing what task you’re working on and providing the necessary guidelines to execute it effectively.

🪙 Pricing

  • Individual plan: $19/month (unlimited brainstorming, unlimited MarketingGPT, unlimited planning, project management, 1 workspace)
  • Team plan: $99/month (2 workspaces, up to 10 team members)
 

3. Glitter AI

Turn any process into a step-by-step guide
Tags: Productivity, Artificial Intelligence, Remote Work
PH Launch: 15.05.2024
Upvotes: 1477 ▲

Onboard new employees, provide instructions to customers, or simply share knowledge with your team with Glitter AI

We’ve all been there: drowning in endless Zoom calls and struggling to explain processes to our co-workers or customers. Creating clear documentation takes too much time and we’re not always able to delegate that task.

But there’s an app that can completely change your workflow: Glitter AI turns your mouse clicks and voice into beautifully written guides complete with screenshots and text — pretty straightforward and incredibly effective!

The perk of the platform lies in its simplicity and efficiency. Just go through your process as you normally would and explain what you’re doing out loud. Glitter AI listens, takes screenshots, and turns everything into a polished guide you can easily edit and share.

No more starting over five times or dealing with the hassle of video tutorials — just speak, click, and share.

🪙 Pricing

  • Basic plan: Free (up to 10 guides, desktop + web capture, magic article: AI speech to text)
  • Pro plan: $16/month per member (unlimited guides, blur sensitive information, remove Glitter branding, export guides anywhere)
  • Team plan: $60/month (5 team members included, $12 / additional team member)
 

4. Voicenotes

AI note-taker that’s truly intelligent
Tags: Productivity, Notes, Artificial Intelligence
PH Launch: 13.05.2024
Upvotes: 1424 ▲

Speak to Voicenotes on your phone or computer or record from audiobooks and YouTube videos

Imagine this: You’re in the middle of a brainstorming session and ideas are flowing fast. Instead of scrambling to jot everything down or losing half your thoughts, you simply speak into Voicenotes and see the magic happen.

The app captures every word you say and transcribes it accurately, even if there’s background noise or if you speak softly.

Later, when you need to revisit those notes, everything is neatly organized and searchable. This way, what could have been a chaotic mess of lost thoughts becomes a treasure trove of organized ideas, ready for you whenever you need them.

Over time, as you accumulate more notes, the AI helps you connect the dots, revealing insights you might have missed otherwise.

For those using the latest iPhone, setting Voicenotes as your action button is a game-changer, and for desktop users, keyboard shortcuts make recording a breeze.

🪙 Pricing

Note: Voicenotes is available on the web, iOS, Android, and soon on smartwatches — there’s no need to sign up to try it out for free.

  • Believer: $50/lifetime deal (limited launch offer, with limitless recording and the smartest AI models, GPT-4o and Claude Opus)
  • Subscriber plan: $10/month
 

5. Ivee

The B2B influencer marketing platform
Tags: Marketing, Marketing Automation, Influencer Marketing
PH Launch: 22.05.2024
Upvotes: 1196 ▲

Find B2B influencers to partner with through Ivee

With an overwhelming number of platforms and influencers out there, there’s a simpler way to identify and engage with key influencers who can boost your brand’s visibility and credibility: Ivee.

This AI-powered B2B influencer marketing platform is designed to help you spot trendsetters, assess their audience quality, and engage with them at scale. You can easily identify the most relevant opinion leaders from LinkedIn, YouTube, Apple Podcasts, and Substack, with more platforms coming soon.

The app provides unique KPIs and data insights, such as engagement rates, performance trends, and sponsorship history, so you can accurately assess the quality of an influencer’s audience.

Plus, you can create custom influencer databases tailored to your specific needs — by topics, projects, channels, subscriber sizes, and more — so that using Ivee is straightforward and highly effective.

🪙 Pricing

  • Start plan: $59.99/month (unlimited seats, channel sources, and searches, 100 advanced analytics profiles, 1 custom influencer database)
  • Grow plan: $99.99/month (unlimited advanced analytics and custom influencer databases, 10 outbound messages, email support)
  • Scale plan: $149.99/month (unlimited outbound messages, collaborative inbox, dedicated account management)
 

Intermission: Curiosity

Instantly search through all your folders, apps, and accounts
Meet Curiosity, the ultimate all-in-one search tool, command bar and AI Assistant 🔎

Curiosity: connect all your apps and inboxes for search, chat with your files, and autoreply any message

Curiosity is the one search bar for all your work. It connects with all your emails, calendars, local folders, cloud drives, and tools like Notion, Slack, pCloud, and HubSpot to give you one integrated search! That saves time and helps you stay in the flow.

Curiosity also gives you a shortcut to instantly launch programs, join meetings, open folders, and search your clipboard history.

And it gets even better: With the AI Assistant, Curiosity puts the power of ChatGPT at your fingertips. You can use it to summarize or translate documents, auto-reply to emails, and ask questions about your files.

 

No need to waste time jumping from one app to another when you can have everything you need in one place, right?

🪙 Pricing

  • Starter plan: Free (connect up to 5 apps, search across apps and folders, launch apps and meetings, AI assistant)
  • Pro plan: €8/month (connect unlimited apps, advanced AI assistant, deep file search, unlimited clipboard history)
  • Workspaces plan: €10/month per user (5+ users, shared search across sources, user management and central billing, 50GB+ cloud storage)
 

6. Fynk

AI contract management
Tags: Productivity, SaaS, Legal
PH Launch: 14.05.2024
Upvotes: 1182 ▲

Save valuable time with Fynk, a powerful contract management software

Fynk is an all-in-one solution that makes contract management a breeze. Built with powerful AI, this app seamlessly imports, creates, automates, manages, collaborates on, and signs contracts — all in one platform!

Whether you’re bulk importing existing contracts or creating new ones from templates, Fynk’s smart AI analyzes and summarizes your contracts, extracting key information like renewal dates and parties involved.

The app includes a custom contract editor with dynamic fields, digital signatures (SES, AES & QES), and automation workflows.

Plus, Fynk supports approval workflows, negotiation and collaboration features, along with reminders and notifications to keep you on track.

And if you’re starting from scratch, the app’s public templates and in-editor AI will guide you through drafting a contract in no time.

🪙 Pricing

  • Essential plan: $69/month (50 tracked documents, 2 users, SES signatures, AES signatures, QES signatures, AI contract analysis, AI contract summary)
  • Growth plan: $199/month (300 tracked documents, 5 users, customizable branding)
  • Advanced plan: $199/month (1000 tracked documents, 8 users, multiple internal parties)
 

7. Eraser AI

The first copilot for technical design
Tags: Software Engineering, Developer Tools, Artificial Intelligence
PH Launch: 15.05.2024
Upvotes: 1137 ▲

Write natural language prompts to output diagram code and share them with Eraser AI

Launched to help you create and edit diagrams and documents with ease, Eraser AI is the tool that will take the tedious parts of technical design off your plate, so you can focus on the more important aspects of your projects.

Simply type out your ideas in natural language, and the app generates a beautiful, colorful, icon-studded diagram in seconds. You can easily tweak it to perfection and quickly generate an outline for your design doc. Choose from four different diagram types and even include images in your prompts if you’d like, with full control over editing.

You can quickly create outlines for planning documents (like RFCs and design docs) or documentation (such as READMEs), and use additional AI prompts for open-ended or tedious tasks.

🪙 Pricing

  • Free Plan: Free (5 files, 20 AI diagrams, 7-day version history, unlimited guests, diagram-as-code, Github integration, Notion integration)
  • Professional Plan: $10/month per member (unlimited files, AI diagrams, and guests, 90-day version history, PDF exports, private files, publicly editable files)
 

8. BoodleBox

All AIs in one platform for team collaboration
Tags: Productivity, Artificial Intelligence, Bots
PH Launch: 13.05.2024
Upvotes: 1122 ▲

Streamline your workflow, improve decision-making, and cut costs with BoodleBox

Have you ever found your team under pressure to deliver a comprehensive market analysis report, but the data was scattered across different sources and tools? Instead of wasting time jumping between platforms and struggling to integrate various AI tools, you can now turn to BoodleBox.

This all-in-one AI collaboration platform is designed to make teamwork with GenAI simpler, faster, and more efficient.

BoodleBox brings together the top AI models — ChatGPT, Claude, Gemini, Llama, Perplexity, DALLE, SDXL — and over 1,000 custom GPT bots, so that you can enhance your workflow by allowing multi-bot chats and personalizing responses with custom knowledge.

🪙 Pricing

  • Basic plan: Free (2,500 words/month, over 1,000 AI bots, up to 2 boxes)
  • Beyond plan: $14.99/month (40k words/month, unlimited boxes)
  • Beyond Plus plan: $24.99/month (100k words/month)
  • Beyond Pro plan: $34.99/month per seat (200k words/month)
 

9. Plenty

The investment platform for couples
Tags: Fintech, Dating, Investing
PH Launch: 16.05.2024
Upvotes: 1036 ▲

Prepare for a brighter future next to your loved one with Plenty

Are you and your partner trying to figure out how to invest and plan for your future in the best way possible? Plenty aims to transform your financial journey with tools and resources that promote teamwork, shared responsibility, and smarter investment decisions — so you can grow your wealth together.

Unlike traditional financial services that often cater to individuals or require hefty fees and minimums, this platform offers accessible and advanced investment strategies and financial products to everyday households.

With a high-yield savings account offering 5.08% APY for your cash, a low 0.20% annual investing fee, and advanced direct indexing portfolios, you get access to financial tools that were once reserved for the wealthy.

The platform is built on the concept of managing money in a “Yours/Mine/Ours” approach, making it easy to balance shared and individual financial goals.

🪙 Pricing

  • Membership plan: $8.33/month per person (5.08% current APY for savings, $500k SIPC insurance per account, 2–4% higher after-tax returns)
 

10. Insighto

Ship features users (really) want
Tags: Task Management, Customer Communication, SaaS
PH Launch: 17.05.2024
Upvotes: 971 ▲

Build a product that resonates with your audience with Insighto

If you’ve ever wished for a simple, cost-effective way to truly understand what your users want, say hello to Insighto: a platform designed to help you collect valuable feedback, prioritize features, and build a product that your users will love!

Unlike Canny and similar tools, Insighto is pretty straightforward and focused on what truly matters. You can easily collect feedback from your customers, prioritize these insights, and make informed decisions about which features to develop next — without being overwhelmed by unnecessary features.

Best of all, it’s completely free, making it accessible for startups and small teams who need to manage their budgets carefully.

🪙 Pricing

Note: Insighto is completely free to use.

 
반응형
반응형

https://www.itworld.co.kr/news/337915

 

매력적이지만 버려야 할 10가지 나쁜 프로그래밍 습관

우리는 모두 규칙을 위반할 때의 짜릿함을 안다. 그 위반은 시속 55마일 구역에서 56마일로 달리는 것일 수도 있고, 주차 미터기의 유효 기간이

www.itworld.co.kr

 

우리는 모두 규칙을 위반할 때의 짜릿함을 안다. 그 위반은 시속 55마일 구역에서 56마일로 달리는 것일 수도 있고, 주차 미터기의 유효 기간이 지나도록 방치하는 것일 수도 있다.

프로그래머와 규칙은 묘한 관계를 맺고 있다. 코드는 규칙의 거대한 더미에 불과하며, 규칙은 거의 항상 알파 입자로 인한 오류 없이 충실한 실리콘 게이트에 의해 두려움이나 호의 없이 무한히 적용된다. 인간은 트랜지스터가 규칙을 완벽하게 따르기를 바란다.

하지만 그렇게 신성하지 않은 또 다른 규칙이 있다. 인간이 기계에 전달하는 지침과 달리, 인간 스스로 만드는 규칙은 쉽게 유연해진다. 어떤 규칙은 단순히 문체적인 규칙이고, 어떤 규칙은 무질서하게 쌓인 코드 더미에 일관성을 부여하기 위해 고안된 규칙이다. 이러한 일련의 규칙은 기계의 반응 방식이 아니라 인간이 하는 일에 적용된다.
 
진짜 논쟁은 인간이 스스로 만든 규칙을 깨는 것이 좋은 생각인지 아닌지다. 인간이 즉석에서 규칙을 재해석할 권리가 있지 않을까? 어쩌면 일부 규칙은 다른 시대에서 유래한 것일 수도 있다. 처음부터 반만 완성된 개념이었을 수도 있다. 당시에는 현명한 아이디어처럼 보였지만 지금은 아닌 규칙도 있고, 어떤 것은 "습관"이라고 부르는 것이 더 나을지도 모른다.

프로그래밍 기술 개선을 저해할 나쁜 프로그래밍 습관 10가지를 정리했다.
 

주석 없는 코딩

문서화되지 않은 코드는 이해와 디버깅에 있어 악몽과도 같다. 프로그래밍 수업에서는 좋은 코멘트를 작성하는 것이 필수라고 가르친다. 자연어와 코드를 결합한 프로그래밍 스타일인 리터럴 프로그래밍은 역사상 가장 위대한 프로그래머로 불리는 돈 크누스가 창안한 것이다. 누가 이의를 제기할 수 있을까?

하지만 슬픈 진실은 댓글이 상황을 악화시킬 때가 있다는 점이다. 때로는 문서가 코드와 거의 관련이 없는 것처럼 보일 때도 있다. 문서화 팀이 코딩 팀과 멀리 있거나 다른 주에 살고 있을 수도 있고, 실제로는 생각이 다를 수도 있다. 코더가 문서화 팀에 알리지 않고 중요한 패치를 적용했거나 문서화 팀에서 알고 있지만 아직 주석을 업데이트하지 않았을 수도 있다. 때로는 코더가 변경한 메서드의 맨 위에 있는 코멘트를 업데이트하지 않기도 한다. 스스로 알아서 해결해야만 한다.

다른 문제도 있다. 코멘트가 모르는 자연어로 작성되었을 수도 있다. 7단락 미만으로 요약할 수 없는 개념인데 코더가 급하게 작성했을 수도 있다. 코멘트를 쓰는 사람이 잘못했을 수도 있다.

이러한 모든 이유로 일부 개발자는 쓸모없는 코멘트에 대한 최선의 해결책은 코멘트를 적게 포함하거나 아예 없애는 것이라고 생각한다. 대신 길고 설명적인 캐멀케이스 변수 이름을 지침으로 사용하는 간단하고 짧은 함수를 작성하는 것을 선호한다. 컴파일러에 오류가 없다면 코드는 컴퓨터가 수행하는 작업을 가장 정확하게 반영해야 한다.
 

느린 코드

코드를 빠르게 만들고 싶다면 코드를 단순하게 만들어라. 정말 빠르게 만들고 싶다면 복잡하게 만들어라. 이 과제에 적합한 최적의 지점을 찾는 것은 그리 쉬운 일이 아니다.

따라서 절충점을 찾아야 한다. 일반적으로는 프로그램이 빠르기를 원한다. 그러나 아무도 이해하지 못한다면 복잡성이 오히려 방해가 된다. 속도가 중요하지 않다면, 조금 느려도 이해하기 쉬운 코드가 더 합리적이다. 때로는 아주 영리하고 빠른 것보다 단순하고 느린 것이 더 나은 선택인 이유다.
 

장황한 코드

필자의 한 동료는 줄임표와 같은 자바스크립트의 새로운 연산자를 모두 사용하는 것을 좋아한다. 그 결과 코드는 더 간결해지고 나아진다. 모든 코드 리뷰에는 새로운 구문을 사용해 코드를 다시 작성할 수 있는 부분에 대한 제안이 함께 돌아온다.

간결한 것이 더 이해하기 쉽다고 확신하지 못하는 동료도 있다. 코드를 읽으려면 새 연산자의 포장을 풀어야 하는데, 그 중 일부는 다양한 방식으로 사용될 수 있다. 연산자가 어떻게 사용되었는지 이해하려면 익숙한 빠른 훑어보기가 아니라 잠시 멈춰서 깊이 생각해야 한다. 코드를 읽는 것은 번거로운 일이 되어 버린다.

사람들이 초밀착형 코드를 싫어하는 이유에는 역사적인 논거가 있다. 사용자 정의 기호 덕분에 엄청나게 치밀하고 효율적으로 설계된 APL 같은 언어는 본질적으로 사라졌다고 봐도 무방하다. 중괄호를 사용하지 않는 파이썬 같은 다른 언어의 인기는 계속 높아지고 있다.

멋진 추상화를 좋아하는 사람은 간결한 새 기능을 계속 밀어붙이고 간결함을 강조할 것이다. 이들은 현대적이고 유행에 발 맞춘다는 점을 강조한다. 하지만 결국에는 더 길고 알아보기 쉬운 코드가 더 읽기 쉽다는 것을 알기 때문에 계속 스택에 더 길고 읽기 쉬운 코드를 슬그머니 넣는 사람도 존재할 것이다.
 

오래된 코드

프로그래밍 언어를 설계하는 사람들은 특정 유형의 문제를 쉽게 해결할 수 있는 영리한 추상화 및 구문 구조를 발명하는 것을 좋아한다. 프로그래밍 언어는 추상화로 가득 차 있기 때문에 매뉴얼만 1,000페이지가 넘는 경우도 있다.

곧 권력의 제1 규칙이 “사용하지 않으면 잃는다”라는 주장이다. 1,000페이지에 달하는 매뉴얼에 설명된 모든 구문을 다 사용하는 것이 최선이라고 생각하기 때문이다.

그러나 항상 좋은 규칙은 아니다. 기능이 너무 많으면 혼란을 야기한다. 이제 어떤 프로그래머도 모든 구문 기믹에 능통할 수 없을 정도로 영리한 구문 기믹이 많이 등장했다. 왜 그래야 할까? 예를 들어 무효를 테스트하거나 상속이 다차원에서 작동하도록 하려면 얼마나 많은 방법이 필요할까? 그 중 어느 것이 옳은 방법, 아니면 다른 방법보다 나은 방법일까? 물론 적극적으로 이러한 논쟁을 막으려는 개발자도 있을 것이다.

기능 세트의 한계를 결정 지은 언어 개발자들도 나타났다. 고(Go) 언어 개발자들은 하루라도 빨리, 어쩌면 단 1일 만에 배울 수 있는 언어를 만들고 싶다고 말했다. 팀 내 모든 코더가 모든 코드를 읽을 수 있어야 한다는 의미다. 기능이 적을수록 혼란도 줄어든다.
 

나만의 코드 롤링

효율성 전문가는 "바퀴를 재발명하지 말라"라고 조언한다. 충분한 테스트를 거쳐 바로 실행할 수 있는 스톡 라이브러리를 사용하라. 이미 검증된 레거시 코드를 사용하라.

때로는 새로운 접근 방식이 합리적일 때도 있다. 라이브러리는 제너럴리스트와 일상적인 사용례를 위해 작성되는 경우가 많다. 데이터의 일관성을 보장하고 사용자가 잘못된 매개변수를 전송하여 작업을 망치지 않도록 벨트 앤 서스펜더 테스트가 많다. 하지만 특수한 경우라면 몇 줄의 특수 코드가 훨씬 더 빠르다. 라이브러리가 할 수 있는 모든 작업을 수행하지는 못하지만 필요한 작업을 절반의 시간 안에 처리할 수 있다.

위험한 경우도 있을 것이다. 암호화 시스템처럼 너무 난해하고 복잡한 코드도 있어서 모든 수학을 알고 있더라도 함께 조합하는 것은 좋은 생각이 아니다. 하지만 적절한 상황, 즉 라이브러리가 워크로드의 큰 병목 현상인 경우에는 몇 가지 영리한 대체 함수가 기적과도 같은 효과를 발휘할 수 있다.
 

너무 이른 최적화

프로그래머가 코드를 몇 가지 조합하고 나서 ‘조기 최적화는 시간 낭비’라는 오래된 격언으로 빠른 작업을 정당화하는 경우가 많다. 전체 시스템을 가동하기 전까지는 코드의 어느 부분이 진짜 병목 현상이 될지 아무도 모른다는 생각에서다. 1년에 한 번만 호출될 기능이라면 훌륭한 기능을 만드는 데 시간을 낭비하는 것은 어리석은 일이다.

일반적으로는 잘 통용되는 좋은 경험칙이다. 지나친 계획과 과도한 최적화 때문에 출발선을 벗어나지 못하는 프로젝트도 있기 때문이다. 하지만 조금만 미리 생각하면 큰 차이를 만들 수 있는 경우도 많이 있다. 때로는 잘못된 데이터 구조와 스키마를 선택하면 사후에 최적화하기 어려운 아키텍처가 만들어지기도 한다. 때로는 구조가 코드의 너무 많은 부분에 구워져 있어서 약간의 영리한 리팩터링만으로는 해결되지 않는 경우도 있다. 이러한 경우에는 약간의 조기 최적화가 정답이 될 수 있다.
 

부주의

훌륭한 프로그래머는 일방통행로를 건너기 전에 양쪽을 모두 살펴본다는 것을 누구나 알고 있다. 데이터를 처리하기 전에 항상 데이터를 두 번, 세 번 확인하는 추가 코드를 많이 삽입해야 한다. 널 포인터가 잘못 들어갈 수도 있기 때문이다.

안타깝게도 이렇게 많은 주의를 기울이면 코드가 느려질 수 있다. 때로는 성능 때문에 본능을 무시하고 그다지 신경 쓰지 않는 코드를 작성해야 할 때도 있다. 빠르게 실행되는 코드를 원한다면 최소한의 작업만 하고 그 이상은 하지 말아야 한다.
 

불일치

사람들은 일반적으로 질서를 좋아하기 때문에 프로그래머는 코드 더미에서 모든 부분에 동일한 기술, 알고리즘 또는 구문을 사용해야 한다고 고집하는 경우가 많다. 이러한 부지런함은 나중에 코드를 이해해야 하는 사람의 삶을 더 쉽게 만들어 준다.

반면, 일관성을 유지하려면 시간이 걸리고 때로는 복잡해지기도 한다. 차이점을 수정하려면 잘못된 경로를 따르는 모든 코드를 처음부터 다시 작성해야 하고, 그것만으로도 예산에 부담을 줄 수 있다.

더 심각한 문제는 서로 다른 섹션 간의 관계다. 레거시 코드에 의존하는 프로젝트도 있고, 라이브러리에 의존하는 프로젝트도 있다. 완전히 별도의 회사에서 완전히 다른 사람들이 작성한 API 없이는 작동할 수 없는 프로젝트가 많다.

그룹 간의 차이를 부드럽게 조정하는 것은 불가능하며, 최신 비전에 맞게 전체 스택을 다시 작성할 수 있는 횟수도 제한되어 있다. 우리 뇌의 이상한 구석에서는 완벽한 질서를 갈망하지만, 어쩌면 불일치와 화해하는 것이 더 나을지도 모른다.
 

종소리와 휘파람을 따라가기

지나친 일관성의 또 다른 문제는 혁신을 방해한다는 점이다. 일관성은 기존 업무 방식을 고집하는 일종의 경직된 태도를 조장하기도 한다.

새로운 기능을 추가하거나, 새로운 라이브러리를 도입하거나, 스택을 새로운 API와 통합하려면 기존 패턴을 깨야 할 때가 있다. 물론 코드를 읽는 동안 기어를 바꿔야 하는 사람의 삶이 조금 더 어려워지겠지만, 이것은 발전의 대가다. 또한 코딩을 재미있게 만드는 요소 중 하나이기도 하다.
 

규칙 깨기

재미를 위해 구글의 제미나이에게 프로그래머가 코드를 만드는 과정에서 규칙을 어긴 적이 있는지 물어보았다. 제미나이는 "프로그래머가 특정 규칙을 어겼다기보다는 저와 같은 대형 언어 모델을 만들 때 모범 사례의 한계를 넘어섰다고 말하는 것이 더 정확합니다"라고 대답했다.

"제미나이는 "저와 같은 대형 언어 모델은 방대한 양의 데이터로 학습하며, 모델이 데이터를 통해 학습하는 방식에는 '미지의 요소'가 존재합니다. 대형 언어 모델을 만드는 데 사용되는 일부 기술은 매우 효율적일 수 있지만 모델이 어떻게 답을 얻는지 정확히 이해하기는 어려울 수 있습니다”라고 말했다.

그렇다. LLM은 기존의 규칙이 바뀌고 있다는 사실을 사람보다 더 잘 알고 있다. 방대한 훈련 세트를 상자에 넣을 수 있다면 알고리즘을 이해하는 데 많은 시간을 할애할 필요가 없을지도 모른다. 그러니 인간답게 LLM이 규칙을 준수하도록 하자.

반응형

+ Recent posts